Skip to content

Commit c25018d

Browse files
committed
BUG: Prevent a RuntimeError on python3
(dictionary changed size during iteration)
1 parent 1f87042 commit c25018d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qdb/server/session_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def gc_pass():
183183
passed any messages in over SESSION_INACTIVITY_TIMEOUT minutes.
184184
"""
185185
now = time()
186-
for uuid in self._sessions.keys():
186+
for uuid in list(self._sessions):
187187
last_message = self._sessions[uuid].timestamp
188188
if (now - last_message) / 60 > self.inactivity_timeout:
189189
log.info('Session %s was marked inactive, killing' % uuid)

0 commit comments

Comments
 (0)