summaryrefslogtreecommitdiff
path: root/lib/custodian
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian')
-rw-r--r--lib/custodian/util/dns.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/custodian/util/dns.rb b/lib/custodian/util/dns.rb
index e04361d..82a7e68 100644
--- a/lib/custodian/util/dns.rb
+++ b/lib/custodian/util/dns.rb
@@ -32,9 +32,7 @@ module Custodian
begin
timeout( period ) do
begin
- Socket.getaddrinfo(ip, 'echo').each do |a|
- resolved = a[2] if ( a )
- end
+ resolved = Socket.getnameinfo(Socket.sockaddr_in(80, ip) ).first
rescue SocketError
resolved = nil
end