Software /
code /
prosody
Diff
net/adns.lua @ 2652:cbc58fc170ad
net.adns: Fix potential traceback on DNS responses with libevent enabled (thanks Flo)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 16 Feb 2010 15:05:18 +0000 |
parent | 2578:61e5eff54415 |
child | 2661:be4b1e796bd2 |
line wrap: on
line diff
--- a/net/adns.lua Mon Feb 15 23:06:57 2010 +0000 +++ b/net/adns.lua Tue Feb 16 15:05:18 2010 +0000 @@ -49,7 +49,9 @@ 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);