Diff

net/adns.lua @ 1715:3a5b6cd6b8c9

net.adns: Add some debug logging to help track down traceback
author Matthew Wild <mwild1@gmail.com>
date Tue, 18 Aug 2009 15:59:11 +0100
parent 1522:569d58d21612
child 1788:45779d67c26c
line wrap: on
line diff
--- a/net/adns.lua	Tue Aug 18 15:58:44 2009 +0100
+++ b/net/adns.lua	Tue Aug 18 15:59:11 2009 +0100
@@ -50,6 +50,12 @@
 	function listener.disconnect()
 	end
 	newconn.handler, newconn._socket = server.wrapclient(sock, "dns", 53, listener);
+	if not newconn.handler then
+		log("warn", "handler is nil");
+	end
+	if not newconn._socket then
+		log("warn", "socket is nil");
+	end
 	newconn.handler.settimeout = function () end
 	newconn.handler.setsockname = function (_, ...) return sock:setsockname(...); end
 	newconn.handler.setpeername = function (_, ...) local ret = sock:setpeername(...); _.setsend(sock.send); return ret; end