diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-02-16 15:05:18 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-02-16 15:05:18 +0000 |
commit | 597eb290d4d114bfd8bf24b0947de1fba66b17e8 (patch) | |
tree | 71b90f221b989d17c74b170bb77bb9f700990ebe | |
parent | 9d3c6849c0a9e8c37374157d7feba95201c542e5 (diff) | |
download | prosody-597eb290d4d114bfd8bf24b0947de1fba66b17e8.tar.gz prosody-597eb290d4d114bfd8bf24b0947de1fba66b17e8.zip |
net.adns: Fix potential traceback on DNS responses with libevent enabled (thanks Flo)
-rw-r--r-- | net/adns.lua | 4 |
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); |