fix(connector): fixed bug of cache dict size error (#1226)

This commit is contained in:
MauricioGarciaS 2023-05-04 13:49:10 +02:00 committed by GitHub
parent 93491eadfc
commit 41c0f19c62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,8 @@ class CachedSessions:
for sessionid, values in self.session_project.items():
if current_time - values[0] > self.max_alive_time:
to_clean_list.append(sessionid)
del self.session_project[sessionid]
for sessionid in to_clean_list:
del self.session_project[sessionid]
return to_clean_list