aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-12-22 12:06:36 +0000
committerMatthew Wild <mwild1@gmail.com>2012-12-22 12:06:36 +0000
commit81b3ba144214371cbfa3ac39d0fae1880cac1302 (patch)
treee4675b7343e73391686e9aaa99242935d88f87bb
parent4130b38a58a4065d7157be93b47fce98fce6ab0e (diff)
downloadprosody-81b3ba144214371cbfa3ac39d0fae1880cac1302.tar.gz
prosody-81b3ba144214371cbfa3ac39d0fae1880cac1302.zip
net.dns: Clean up query list when a server is marked down
-rw-r--r--net/dns.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/dns.lua b/net/dns.lua
index 5b32a56c..1950ba73 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -549,6 +549,7 @@ function resolver:decode(packet, force) -- - - - - - - - - - - - - - decode
if not force then
if not self.active[response.header.id] or not self.active[response.header.id][response.question.raw] then
+ self.active[response.header.id] = nil;
return nil;
end
end
@@ -796,6 +797,9 @@ function resolver:servfail(sock)
end
end
end
+ if next(queries) == nil then
+ self.active[id] = nil;
+ end
end
if num == self.best_server then
@@ -852,6 +856,7 @@ function resolver:receive(rset) -- - - - - - - - - - - - - - - - - receive
set(self.wanted, q.class, q.type, q.name, nil);
end
end
+
end
end
end