完善websocket关闭连接功能

This commit is contained in:
2026-09-29 14:13:11 +08:00
parent 9dc511f08b
commit fa7e908a08
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ function initWebSocket(server) {
// 连接关闭
ws.on("close", () => {
removeConnection(username);
removeConnection(username, ws);
// 通知所有在线用户当前在线用户列表
broadcast({