# HG changeset patch # User Kim Alvefur # Date 1414667415 -3600 # Node ID 4a28b8320d7f74625f3f3643fe921c7a0867ccfe # Parent 84ca02c6a47ec0dcffb894bf3189ab149bd37e5d net.dns: Return new socket from servfail diff -r 84ca02c6a47e -r 4a28b8320d7f net/dns.lua --- a/net/dns.lua Thu Oct 30 12:08:05 2014 +0100 +++ b/net/dns.lua Thu Oct 30 12:10:15 2014 +0100 @@ -787,7 +787,7 @@ local num = self.socketset[sock] -- Socket is dead now - self:voidsocket(sock); + sock = self:voidsocket(sock); -- Find all requests to the down server, and retry on the next server self.time = socket.gettime(); @@ -804,8 +804,8 @@ --print('timeout'); queries[question] = nil; else - local _a = self:getsocket(o.server); - if _a then _a:send(o.packet); end + sock = self:getsocket(o.server); + if sock then sock:send(o.packet); end end end end @@ -821,6 +821,7 @@ self.best_server = 1; end end + return sock; end function resolver:settimeout(seconds)