# HG changeset patch # User Brian Cully # Date 1262011795 -18000 # Node ID e54774bd73a7f2976e72b730c47f2349b1efb99a # Parent 820ae39e06de5334e125778dc084d6587ea8632e net/dns: Fix socket.select timeout. diff -r 820ae39e06de -r e54774bd73a7 net/dns.lua --- 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