Software /
code /
prosody
Diff
net/dns.lua @ 3049:e54774bd73a7
net/dns: Fix socket.select timeout.
author | Brian Cully <bjc@junctionnetworks.com> |
---|---|
date | Mon, 28 Dec 2009 19:49:55 +0500 |
parent | 2742:6c0a081cd766 |
child | 3056:c585678b3ecb |
line wrap: on
line diff
--- a/net/dns.lua Tue May 18 00:47:06 2010 +0100 +++ b/net/dns.lua Mon Dec 28 19:49:55 2009 +0500 @@ -851,7 +851,14 @@ 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