From 4ef8d20582c104bb34f23c24212301cc46af7ae3 Mon Sep 17 00:00:00 2001
From: JIAKUNHAO <jiakunhao@star-rising.com>
Date: Thu, 24 Nov 2022 16:50:37 +0800
Subject: [PATCH] ws

---
 app/utils/websocket_tool.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/app/utils/websocket_tool.py b/app/utils/websocket_tool.py
index ae40ae2..b8f0c04 100644
--- a/app/utils/websocket_tool.py
+++ b/app/utils/websocket_tool.py
@@ -73,8 +73,7 @@ manager = WebsocketUtil()
 
 def write(id: str, ws: List):
     with open(f"{id}.pkl", "wb") as f:
-        wsdump = pickle.dump(ws)
-        f.write(wsdump)
+        wsdump = pickle.dump(ws, f)
 
 
 def read(id: str):