Oops, dns_done() crashed if the request had already been timed out.

This commit is contained in:
Avery Pennarun 2011-01-26 05:19:03 -08:00
parent b570778894
commit 760740e9aa

View File

@ -295,7 +295,7 @@ def _main(listener, fw, ssh_cmd, remotename, python, latency_control,
dnsreqs = {}
def dns_done(chan, data):
peer,timeout = dnsreqs.get(chan)
peer,timeout = dnsreqs.get(chan) or (None,None)
debug3('dns_done: channel=%r peer=%r\n' % (chan, peer))
if peer:
del dnsreqs[chan]