diff --git a/lib/cool.io/dns_resolver.rb b/lib/cool.io/dns_resolver.rb index 7e0774c..0935121 100644 --- a/lib/cool.io/dns_resolver.rb +++ b/lib/cool.io/dns_resolver.rb @@ -113,8 +113,7 @@ def on_timeout # Send a request to the DNS server def send_request - nameserver = @nameservers.shift - @nameservers << nameserver # rotate them + @nameservers.rotate! begin @socket.send request_message, 0, @nameservers.first, DNS_PORT rescue Errno::EHOSTUNREACH # TODO figure out why it has to be wrapper here, when the other wrapper should be wrapping this one!