Changeset

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
parents 2651:0c40e60a4367
children 2653:7491cef7b5c5 2654:07a6f5f9d4be
files net/adns.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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);