diff options
author | Brian Cully <bjc@junctionnetworks.com> | 2009-12-28 19:49:55 +0500 |
---|---|---|
committer | Brian Cully <bjc@junctionnetworks.com> | 2009-12-28 19:49:55 +0500 |
commit | f135b2f4a427a21167576e14ac2f08c1179ce275 (patch) | |
tree | 2dc1f57141cb26b1a68e43c783a8dc96f8522619 /net/dns.lua | |
parent | e7abee25d8a3175fa14a02b21ba9c14c54e9fcef (diff) | |
download | prosody-f135b2f4a427a21167576e14ac2f08c1179ce275.tar.gz prosody-f135b2f4a427a21167576e14ac2f08c1179ce275.zip |
net/dns: Fix socket.select timeout.
Diffstat (limited to 'net/dns.lua')
-rw-r--r-- | net/dns.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua index 8855cc61..020a0ae8 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -851,7 +851,14 @@ end function resolver:lookup(qname, qtype, qclass) -- - - - - - - - - - lookup self:query (qname, qtype, qclass) - while self:pulse() do socket.select(self.socket, nil, 4); end + while self:pulse() do + local recvt = {} + local i, s + for i, s in ipairs(self.socket) do + recvt[i] = s.socket() + end + socket.select(recvt, nil, 4) + end --print(self.cache); return self:peek(qname, qtype, qclass); end |