Commit 117afc7a authored by vieira's avatar vieira Committed by Brian May

Fixed dictionary changed size during iteration

The removal loop should probably be outside the iteration loop.
parent c6198408
...@@ -334,8 +334,8 @@ def main(latency_control): ...@@ -334,8 +334,8 @@ def main(latency_control):
debug3('expiring dnsreqs channel=%d\n' % channel) debug3('expiring dnsreqs channel=%d\n' % channel)
remove.append(channel) remove.append(channel)
h.ok = False h.ok = False
for channel in remove: for channel in remove:
del dnshandlers[channel] del dnshandlers[channel]
if udphandlers: if udphandlers:
remove = [] remove = []
for channel, h in udphandlers.items(): for channel, h in udphandlers.items():
...@@ -343,5 +343,5 @@ def main(latency_control): ...@@ -343,5 +343,5 @@ def main(latency_control):
debug3('expiring UDP channel=%d\n' % channel) debug3('expiring UDP channel=%d\n' % channel)
remove.append(channel) remove.append(channel)
h.ok = False h.ok = False
for channel in remove: for channel in remove:
del udphandlers[channel] del udphandlers[channel]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment