From 8455396249e4a31225b3693017c77edec736abe1 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Thu, 19 Dec 2024 13:46:30 -0800 Subject: [PATCH] fix: websocket redis --- backend/open_webui/socket/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/socket/main.py b/backend/open_webui/socket/main.py index add952331..702da418c 100644 --- a/backend/open_webui/socket/main.py +++ b/backend/open_webui/socket/main.py @@ -152,7 +152,7 @@ async def connect(sid, environ, auth): if user: SESSION_POOL[sid] = user.id if user.id in USER_POOL: - USER_POOL[user.id].append(sid) + USER_POOL[user.id] = USER_POOL[user.id] + [sid] else: USER_POOL[user.id] = [sid] @@ -179,7 +179,7 @@ async def user_join(sid, data): SESSION_POOL[sid] = user.id if user.id in USER_POOL: - USER_POOL[user.id].append(sid) + USER_POOL[user.id] = USER_POOL[user.id] + [sid] else: USER_POOL[user.id] = [sid]