(20250102) SocketIO on-disconnect bug fixed.
This commit is contained in:
@@ -462,8 +462,8 @@ async def handle_disconnect(sid, reason) -> None:
|
|||||||
|
|
||||||
# register the disconnect in the global variable, and on the cache server:
|
# register the disconnect in the global variable, and on the cache server:
|
||||||
client_info = {}
|
client_info = {}
|
||||||
async with exclusive_lock: client_info = CONNECTED_CLIENTS.pop(sid)
|
async with exclusive_lock: client_info = CONNECTED_CLIENTS.pop(sid, None)
|
||||||
sid_uncached = await redis_cache.delete(key = client_info["redisKey"])
|
sid_uncached = await redis_cache.delete(key = client_info["redisKey"]) if client_info else False
|
||||||
printer("SOCKET DISCONNECTED", sid, reason, sid_uncached)
|
printer("SOCKET DISCONNECTED", sid, reason, sid_uncached)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user