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 |