aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-07-25 12:54:31 +0100
committerMatthew Wild <mwild1@gmail.com>2014-07-25 12:54:31 +0100
commit7ff1520d7df876006a7c4bba2bf36c4792fa7bd5 (patch)
tree3a4fd8c4d51154eee6ec7399200952b00f7c7ff7 /net
parent4ed07e7947ed559ae1b97d031351b5874156eec0 (diff)
downloadprosody-7ff1520d7df876006a7c4bba2bf36c4792fa7bd5.tar.gz
prosody-7ff1520d7df876006a7c4bba2bf36c4792fa7bd5.zip
net.dns: Remove unused obsolete code
Diffstat (limited to 'net')
-rw-r--r--net/dns.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/dns.lua b/net/dns.lua
index 906365ce..89bd3564 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -745,7 +745,6 @@ function resolver:query(qname, qtype, qclass) -- - - - - - - - - - -- query
-- remember which coroutine wants the answer
if co then
set(self.wanted, qclass, qtype, qname, co, true);
- --set(self.yielded, co, qclass, qtype, qname, true);
end
local conn, err = self:getsocket(o.server)
@@ -858,7 +857,6 @@ function resolver:receive(rset) -- - - - - - - - - - - - - - - - - receive
local cos = get(self.wanted, q.class, q.type, q.name);
if cos then
for co in pairs(cos) do
- set(self.yielded, co, q.class, q.type, q.name, nil);
if coroutine.status(co) == "suspended" then coroutine.resume(co); end
end
set(self.wanted, q.class, q.type, q.name, nil);
@@ -899,7 +897,6 @@ function resolver:feed(sock, packet, force)
local cos = get(self.wanted, q.class, q.type, q.name);
if cos then
for co in pairs(cos) do
- set(self.yielded, co, q.class, q.type, q.name, nil);
if coroutine.status(co) == "suspended" then coroutine.resume(co); end
end
set(self.wanted, q.class, q.type, q.name, nil);
@@ -1037,7 +1034,7 @@ end
function dns.resolver () -- - - - - - - - - - - - - - - - - - - - - resolver
-- this function seems to be redundant with resolver.new ()
- local r = { active = {}, cache = {}, unsorted = {}, wanted = {}, yielded = {}, best_server = 1 };
+ local r = { active = {}, cache = {}, unsorted = {}, wanted = {}, best_server = 1 };
setmetatable (r, resolver);
setmetatable (r.cache, cache_metatable);
setmetatable (r.unsorted, { __mode = 'kv' });