Commit bee6e870 authored by Maxime Chéramy's avatar Maxime Chéramy
Browse files

Copy the timeouts' items and the alarms' keys before iterating over them.

parent 77f654fd
......@@ -322,11 +322,11 @@ class IdleQueue:
current_time = self.current_time()
for fd, timeouts in self.read_timeouts.items():
for fd, timeouts in list(self.read_timeouts.items()):
if fd not in self.queue:
for timeout, func in timeouts.items():
for timeout, func in list(timeouts.items()):
if timeout > current_time:
if func:
......@@ -337,7 +337,7 @@ class IdleQueue:
self.remove_timeout(fd, timeout)
times = self.alarms.keys()
times = list(self.alarms.keys())
for alarm_time in times:
if alarm_time > current_time:
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