# HG changeset patch # User Matthew Wild # Date 1266332718 0 # Node ID cbc58fc170adfbc8c398a1f16d8724da4f9e2719 # Parent 0c40e60a4367cd178763abbab33f48a1023e4263 net.adns: Fix potential traceback on DNS responses with libevent enabled (thanks Flo) diff -r 0c40e60a4367 -r cbc58fc170ad net/adns.lua --- 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);