浏览代码

fix: websocket redis

Timothy Jaeryang Baek 4 月之前
父节点
当前提交
8455396249
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      backend/open_webui/socket/main.py

+ 2 - 2
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]