diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-07-05 11:51:17 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-07-05 11:51:17 +0100 |
commit | e23e53d3b8d5af13e22fbbb41768e72790d91c3d (patch) | |
tree | 705e132eab9c42c61ce2fc5dfb439fb09692c550 /net/adns.lua | |
parent | 4b2249df84a6c1c336464f6b62684f567b436f61 (diff) | |
download | prosody-e23e53d3b8d5af13e22fbbb41768e72790d91c3d.tar.gz prosody-e23e53d3b8d5af13e22fbbb41768e72790d91c3d.zip |
net.dns, net.adns: Move coroutine-calling logic into resolver:cancel()
Diffstat (limited to 'net/adns.lua')
-rw-r--r-- | net/adns.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/adns.lua b/net/adns.lua index 88d4b4b3..7fadbe3f 100644 --- a/net/adns.lua +++ b/net/adns.lua @@ -36,12 +36,9 @@ function lookup(handler, qname, qtype, qclass) end)(dns.peek(qname, qtype, qclass)); end -function cancel(handle, call_handler) +function cancel(handle, call_handler, reason) log("warn", "Cancelling DNS lookup for %s", tostring(handle[3])); - dns.cancel(handle); - if call_handler then - coroutine.resume(handle[4]); - end + dns.cancel(handle, call_handler); end function new_async_socket(sock, resolver) |