aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/adns.lua2
-rw-r--r--net/dns.lua10
2 files changed, 6 insertions, 6 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 7fadbe3f..d0151c8c 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -38,7 +38,7 @@ end
function cancel(handle, call_handler, reason)
log("warn", "Cancelling DNS lookup for %s", tostring(handle[3]));
- dns.cancel(handle, call_handler);
+ dns.cancel(handle[1], handle[2], handle[3], handle[4], call_handler);
end
function new_async_socket(sock, resolver)
diff --git a/net/dns.lua b/net/dns.lua
index 6a74abd8..b3cce111 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -698,7 +698,7 @@ function resolver:query(qname, qtype, qclass) -- - - - - - - - - - -- query
return dns_timeout;
else
-- Tried everything, failed
- resolver:cancel({qclass, qtype, qname, co}, true);
+ resolver:cancel(qclass, qtype, qname, co, true);
end
end
end)
@@ -830,13 +830,13 @@ function resolver:feed(sock, packet)
return response;
end
-function resolver:cancel(data, call_handler)
- local cos = get(self.wanted, unpack(data, 1, 3));
+function resolver:cancel(qclass, qtype, qname, co, call_handler)
+ local cos = get(self.wanted, qclass, qtype, qname);
if cos then
if call_handler then
- coroutine.resume(data[4]);
+ coroutine.resume(co);
end
- cos[data[4]] = nil;
+ cos[co] = nil;
end
end