aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-16 15:05:18 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-16 15:05:18 +0000
commit597eb290d4d114bfd8bf24b0947de1fba66b17e8 (patch)
tree71b90f221b989d17c74b170bb77bb9f700990ebe /net/adns.lua
parent9d3c6849c0a9e8c37374157d7feba95201c542e5 (diff)
downloadprosody-597eb290d4d114bfd8bf24b0947de1fba66b17e8.tar.gz
prosody-597eb290d4d114bfd8bf24b0947de1fba66b17e8.zip
net.adns: Fix potential traceback on DNS responses with libevent enabled (thanks Flo)
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/adns.lua b/net/adns.lua
index 4341ffb5..d1876b0f 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -49,7 +49,9 @@ function new_async_socket(sock, resolver)
local listener = {};
local handler = {};
function listener.onincoming(conn, data)
- dns.feed(handler, data);
+ if data then
+ dns.feed(handler, data);
+ end
end
function listener.ondisconnect(conn, err)
log("warn", "DNS socket for %s disconnected: %s", peername, err);