From 7489a3e3c8b670adbff14b0d4896d9061e7def35 Mon Sep 17 00:00:00 2001 From: JIAKUNHAO Date: Thu, 24 Nov 2022 17:04:46 +0800 Subject: [PATCH] ws --- app/utils/websocket_tool.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils/websocket_tool.py b/app/utils/websocket_tool.py index 010ae38..8813b77 100644 --- a/app/utils/websocket_tool.py +++ b/app/utils/websocket_tool.py @@ -23,7 +23,7 @@ class WebsocketUtil: def __init__(self): # self.active_connections = multiprocessing.Manager().list() - self.active_connections_dist = {} + self.active_connections_dist = [] def connect(self, ws, id: str): @@ -35,7 +35,7 @@ class WebsocketUtil: ws_list.append(ws) else: ws_list = [ws, ] - write(id=id, ws=list) + write(id=id, ws=ws_list)