summaryrefslogtreecommitdiff
path: root/lib/ping.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ping.rb')
-rw-r--r--lib/ping.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ping.rb b/lib/ping.rb
index 48657818cc..d698dd0c52 100644
--- a/lib/ping.rb
+++ b/lib/ping.rb
@@ -47,6 +47,8 @@ module Ping
s = TCPsocket.new(host, service)
s.close
end
+ rescue Errno::ECONNREFUSED
+ return true
rescue
return false
end