From 382ad93da1610c1665577ef6f96b808dd6fb6677 Mon Sep 17 00:00:00 2001 From: "lihaibin@earthonline.com" <‘lihaibin@national-space.com’> Date: Fri, 12 Jul 2024 08:44:36 +0800 Subject: [PATCH] update data info --- network/websocket.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/network/websocket.go b/network/websocket.go index 3df3f4c7..86fd4664 100644 --- a/network/websocket.go +++ b/network/websocket.go @@ -34,6 +34,9 @@ func InitConnection(wsConn *websocket.Conn) (*OnlineUser, error) { Connection: wsConn, inChan: make(chan string, BytebufLen), } + + defer conn.Connection.Close() + go conn.handleLoop() //conn.readLoop()