fix: websocket redis

This commit is contained in:
Timothy Jaeryang Baek 2024-12-19 13:46:30 -08:00
parent 16504b88f5
commit 8455396249

View File

@ -152,7 +152,7 @@ async def connect(sid, environ, auth):
if user: if user:
SESSION_POOL[sid] = user.id SESSION_POOL[sid] = user.id
if user.id in USER_POOL: if user.id in USER_POOL:
USER_POOL[user.id].append(sid) USER_POOL[user.id] = USER_POOL[user.id] + [sid]
else: else:
USER_POOL[user.id] = [sid] USER_POOL[user.id] = [sid]
@ -179,7 +179,7 @@ async def user_join(sid, data):
SESSION_POOL[sid] = user.id SESSION_POOL[sid] = user.id
if user.id in USER_POOL: if user.id in USER_POOL:
USER_POOL[user.id].append(sid) USER_POOL[user.id] = USER_POOL[user.id] + [sid]
else: else:
USER_POOL[user.id] = [sid] USER_POOL[user.id] = [sid]