summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvieira <vieira@yubo.be>2015-12-13 21:42:11 +0000
committerBrian May <brian@linuxpenguins.xyz>2015-12-14 16:46:11 +1100
commit117afc7a68e75fcfe7cdb11f8d8a277767b61552 (patch)
tree5364151d6463f50de05b3bc7247a63e11363687b
parentc61984088bbc86894a27f32436c80a3f14903d6c (diff)
Fixed dictionary changed size during iteration
The removal loop should probably be outside the iteration loop.
-rw-r--r--sshuttle/server.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/sshuttle/server.py b/sshuttle/server.py
index 85c5599..0aee55a 100644
--- a/sshuttle/server.py
+++ b/sshuttle/server.py
@@ -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]