X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=net%2Fadns.lua;h=d0151c8c31a4721b3bddfff472d17a32092b4f04;hb=0160777316848c3807928e747224ce8b2ee56b47;hp=88d4b4b39c4c1e2b71e0b9c36424f2b998ad1700;hpb=2f3a9c1f031f043e3984488f0ec5affa53a2f2f3;p=prosody.git diff --git a/net/adns.lua b/net/adns.lua index 88d4b4b3..d0151c8c 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[1], handle[2], handle[3], handle[4], call_handler); end function new_async_socket(sock, resolver)