Changeset

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
parents 1714:f05a29356269
children 1717:beadd8da061c
files net/adns.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
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