diff options
author | Kim Alvefur <zash@zash.se> | 2016-01-22 15:03:02 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-01-22 15:03:02 +0100 |
commit | 931549f781d8a0cb98af05b98cf00880dca5fb9f (patch) | |
tree | 6826436cb243da87ede7abff06607216fa25fa4b /net/dns.lua | |
parent | b0864f247d26d45d1a2e6f0dc4958254ca8bcb47 (diff) | |
parent | 6116ba8cfbeff29bd3c4cedd1b05babec47e1507 (diff) | |
download | prosody-931549f781d8a0cb98af05b98cf00880dca5fb9f.tar.gz prosody-931549f781d8a0cb98af05b98cf00880dca5fb9f.zip |
Merge 0.10->trunk
Diffstat (limited to 'net/dns.lua')
-rw-r--r-- | net/dns.lua | 14 |
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 |