Comparison

net/dns.lua @ 2301:8a01b0898679

net.dns: Fix for blocking dns lookups to find waiting coroutines correctly (not that we use this in Prosody...)
author Matthew Wild <mwild1@gmail.com>
date Thu, 03 Dec 2009 01:13:06 +0000
parent 2300:e182b5029ef2
child 2387:92264ee3a0e4
comparison
equal deleted inserted replaced
2300:e182b5029ef2 2301:8a01b0898679
743 743
744 if not next(queries) then self.active[response.header.id] = nil; end 744 if not next(queries) then self.active[response.header.id] = nil; end
745 if not next(self.active) then self:closeall(); end 745 if not next(self.active) then self:closeall(); end
746 746
747 -- was the query on the wanted list? 747 -- was the query on the wanted list?
748 local q = response.question; 748 local q = response.question[1];
749 local cos = get(self.wanted, q.class, q.type, q.name); 749 local cos = get(self.wanted, q.class, q.type, q.name);
750 if cos then 750 if cos then
751 for co in pairs(cos) do 751 for co in pairs(cos) do
752 set(self.yielded, co, q.class, q.type, q.name, nil); 752 set(self.yielded, co, q.class, q.type, q.name, nil);
753 if coroutine.status(co) == "suspended" then coroutine.resume(co); end 753 if coroutine.status(co) == "suspended" then coroutine.resume(co); end