net.adns: Add some debug logging to help track down traceback

Tue, 18 Aug 2009 15:59:11 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 18 Aug 2009 15:59:11 +0100
changeset 1715
3a5b6cd6b8c9
parent 1714
f05a29356269
child 1717
beadd8da061c

net.adns: Add some debug logging to help track down traceback

net/adns.lua file | annotate | diff | comparison | revisions
--- 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

mercurial