Improve debugging.

This commit is contained in:
Brian May 2011-06-16 14:42:15 +10:00
parent b26e1ee652
commit 6b7cf770f5

View File

@ -221,7 +221,7 @@ def main():
dnshandlers = {}
def dns_req(channel, data):
debug2('Incoming DNS request.\n')
debug2('Incoming DNS request channel=%d.\n' % channel)
h = DnsProxy(mux, channel, data)
handlers.append(h)
dnshandlers[channel] = h
@ -243,5 +243,6 @@ def main():
now = time.time()
for channel,h in dnshandlers.items():
if h.timeout < now or not h.ok:
debug3('expiring dnsreqs channel=%d\n' % channel)
del dnshandlers[channel]
h.ok = False