Fixed dictionary changed size during iteration

The removal loop should probably be outside the iteration loop.
This commit is contained in:
vieira 2015-12-13 21:42:11 +00:00 committed by Brian May
parent c61984088b
commit 117afc7a68

View File

@ -334,8 +334,8 @@ def main(latency_control):
debug3('expiring dnsreqs channel=%d\n' % channel)
remove.append(channel)
h.ok = False
for channel in remove:
del dnshandlers[channel]
for channel in remove:
del dnshandlers[channel]
if udphandlers:
remove = []
for channel, h in udphandlers.items():
@ -343,5 +343,5 @@ def main(latency_control):
debug3('expiring UDP channel=%d\n' % channel)
remove.append(channel)
h.ok = False
for channel in remove:
del udphandlers[channel]
for channel in remove:
del udphandlers[channel]