mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-06-19 17:39:08 +02:00
Fixed dictionary changed size during iteration
The removal loop should probably be outside the iteration loop.
This commit is contained in:
parent
c61984088b
commit
117afc7a68
@ -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):
|
|||||||
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]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user