aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-07-10 07:45:10 +0200
committerKim Alvefur <zash@zash.se>2013-07-10 07:45:10 +0200
commit5b13d561ee874824d6f4ab70d72307264f22973f (patch)
tree9567263f0c149d8f808508d42366f33e83f6058c /net/adns.lua
parent98ce25306381896a2502e833f1e218d7c599cc4e (diff)
downloadprosody-5b13d561ee874824d6f4ab70d72307264f22973f.tar.gz
prosody-5b13d561ee874824d6f4ab70d72307264f22973f.zip
net.dns, net.adns: Make sure errors from net.server are propagated (thanks asterix)
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/adns.lua b/net/adns.lua
index cd69a627..158747c6 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -68,9 +68,9 @@ function new_async_socket(sock, resolver)
resolver:servfail(conn); -- Let the magic commence
end
end
- handler = server.wrapclient(sock, "dns", 53, listener);
+ handler, err = server.wrapclient(sock, "dns", 53, listener);
if not handler then
- log("warn", "handler is nil");
+ return nil, err;
end
handler.settimeout = function () end