From bef684b3fe3447a9b4d6f8e553763ef63725ed25 Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 13 Feb 2024 15:06:46 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=98=EB=AA=BB=EB=90=9C=20=ED=98=B8?= =?UTF-8?q?=EC=B6=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wshandler/wshandler.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/wshandler/wshandler.go b/wshandler/wshandler.go index d9d9d21..ec832ad 100644 --- a/wshandler/wshandler.go +++ b/wshandler/wshandler.go @@ -297,7 +297,7 @@ func (ws *WebsocketHandler) mainLoop(ctx context.Context) { defer func() { for _, conn := range entireConns { - ws.Call(conn.sender, ClientDisconnected, nil) + ws.ClientDisconnected(conn) conn.Close() } }() @@ -459,11 +459,9 @@ func (ws *WebsocketHandler) mainLoop(ctx context.Context) { case c := <-ws.connInOutChan: if c.Conn == nil { delete(entireConns, c.sender.Accid.Hex()) - logger.Println("ClientDisconnected :", c.sender.Alias) go ws.ClientDisconnected(c) } else { entireConns[c.sender.Accid.Hex()] = c - logger.Println("ClientConnected :", c.sender.Alias) go ws.ClientConnected(c) }