From 41ad8064692b8c387d98ad0f96ddc8c3275317d3 Mon Sep 17 00:00:00 2001 From: JIAKUNHAO Date: Thu, 24 Nov 2022 16:52:54 +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 b8f0c04..c41a84e 100644 --- a/app/utils/websocket_tool.py +++ b/app/utils/websocket_tool.py @@ -60,8 +60,8 @@ class WebsocketUtil: def send_message_proj_json(self, message: Union[str, int, List, Dict], id: str): # 广播该项目的消息 - active_connections_dist = read(id=id) - for connection in active_connections_dist[id]: + active_connections = read(id=id) + for connection in active_connections: try: connection.send(json.dumps(message, cls=MyEncoder, indent=4), ) except Exception as e: