Changeset

6310:d232bb1bbe1e

net.dns: Remove unused obsolete code
author Matthew Wild <mwild1@gmail.com>
date Fri, 25 Jul 2014 12:54:31 +0100
parents 6309:b6f76a52eb36
children 6311:f44876548487
files net/dns.lua
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/net/dns.lua	Fri Jul 25 12:08:07 2014 +0100
+++ b/net/dns.lua	Fri Jul 25 12:54:31 2014 +0100
@@ -745,7 +745,6 @@
 	-- 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 @@
 					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 @@
 			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 @@
 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' });