aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-07-05 11:51:17 +0100
committerMatthew Wild <mwild1@gmail.com>2010-07-05 11:51:17 +0100
commite23e53d3b8d5af13e22fbbb41768e72790d91c3d (patch)
tree705e132eab9c42c61ce2fc5dfb439fb09692c550 /net/dns.lua
parent4b2249df84a6c1c336464f6b62684f567b436f61 (diff)
downloadprosody-e23e53d3b8d5af13e22fbbb41768e72790d91c3d.tar.gz
prosody-e23e53d3b8d5af13e22fbbb41768e72790d91c3d.zip
net.dns, net.adns: Move coroutine-calling logic into resolver:cancel()
Diffstat (limited to 'net/dns.lua')
-rw-r--r--net/dns.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/dns.lua b/net/dns.lua
index 1b8a88fa..6a74abd8 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -830,9 +830,12 @@ function resolver:feed(sock, packet)
return response;
end
-function resolver:cancel(data)
+function resolver:cancel(data, call_handler)
local cos = get(self.wanted, unpack(data, 1, 3));
if cos then
+ if call_handler then
+ coroutine.resume(data[4]);
+ end
cos[data[4]] = nil;
end
end