aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-01-22 14:49:05 +0100
committerKim Alvefur <zash@zash.se>2016-01-22 14:49:05 +0100
commit9cfa6a9d4994b61842b2478df4470922fb3a2546 (patch)
tree3f7098f07d3ae232ef8a765d0bedcc4d1cda8df2 /net/dns.lua
parent19b9ea3838a29c06f1bbb6ddec5645187e675dac (diff)
parent48feb105c43a32c3e956ade72946551efed82b93 (diff)
downloadprosody-9cfa6a9d4994b61842b2478df4470922fb3a2546.tar.gz
prosody-9cfa6a9d4994b61842b2478df4470922fb3a2546.zip
Merge 0.9->0.10
Diffstat (limited to 'net/dns.lua')
-rw-r--r--net/dns.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/dns.lua b/net/dns.lua
index d711af34..b047ec54 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -754,17 +754,17 @@ function resolver:query(qname, qtype, qclass) -- - - - - - - - - - -- query
self.active[id] = self.active[id] or {};
self.active[id][question] = o;
- -- remember which coroutine wants the answer
- if co then
- set(self.wanted, qclass, qtype, qname, co, true);
- end
-
local conn, err = self:getsocket(o.server)
if not conn then
return nil, err;
end
conn:send (o.packet)
+ -- remember which coroutine wants the answer
+ if co then
+ set(self.wanted, qclass, qtype, qname, co, true);
+ end
+
if timer and self.timeout then
local num_servers = #self.server;
local i = 1;
@@ -861,7 +861,7 @@ function resolver:receive(rset) -- - - - - - - - - - - - - - - - - receive
-- retire the query
local queries = self.active[response.header.id];
queries[response.question.raw] = nil;
-
+
if not next(queries) then self.active[response.header.id] = nil; end
if not next(self.active) then self:closeall(); end
@@ -875,7 +875,7 @@ function resolver:receive(rset) -- - - - - - - - - - - - - - - - - receive
set(self.wanted, q.class, q.type, q.name, nil);
end
end
-
+
end
end
end