projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
eeb6494
)
net.dns: Return new socket from servfail
author
Kim Alvefur
<zash@zash.se>
Thu, 30 Oct 2014 11:10:15 +0000
(12:10 +0100)
committer
Kim Alvefur
<zash@zash.se>
Thu, 30 Oct 2014 11:10:15 +0000
(12:10 +0100)
net/dns.lua
patch
|
blob
|
history
diff --git
a/net/dns.lua
b/net/dns.lua
index dc2da1b608f3a29c33b1f22b0eeb175223bbd24e..55622fc81ccadf2f8c5f172d1ddaf86b1e93427c 100644
(file)
--- a/
net/dns.lua
+++ b/
net/dns.lua
@@
-787,7
+787,7
@@
function resolver:servfail(sock)
local num = self.socketset[sock]
-- Socket is dead now
local num = self.socketset[sock]
-- Socket is dead now
- self:voidsocket(sock);
+ s
ock = s
elf:voidsocket(sock);
-- Find all requests to the down server, and retry on the next server
self.time = socket.gettime();
-- Find all requests to the down server, and retry on the next server
self.time = socket.gettime();
@@
-804,8
+804,8
@@
function resolver:servfail(sock)
--print('timeout');
queries[question] = nil;
else
--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
end
end
end
@@
-821,6
+821,7
@@
function resolver:servfail(sock)
self.best_server = 1;
end
end
self.best_server = 1;
end
end
+ return sock;
end
function resolver:settimeout(seconds)
end
function resolver:settimeout(seconds)