refactor(server): 修改 WebSocket 关闭事件处理逻辑
Some checks failed
/ playwright (push) Successful in 1m55s
/ build-and-test (push) Failing after 1m43s
CI/CD Pipeline / playwright (push) Successful in 3m48s
CI/CD Pipeline / build-and-deploy (push) Successful in 4m46s

This commit is contained in:
严浩
2025-10-16 15:06:39 +08:00
parent 9b09413010
commit 4e31d8b80c
3 changed files with 4 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ const connectWebSocket = async () => {
// 断开WebSocket连接
const disconnectWebSocket = () => {
if (ws.value) {
ws.value.close(1000, '用户主动断开连接');
ws.value.close(4000, '用户主动断开连接');
ws.value = null;
}
};