From a5b7e119644d3ec6e1cb730ace2e1f7f6e8f64d8 Mon Sep 17 00:00:00 2001 From: mountain Date: Sat, 12 Aug 2023 19:30:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A2=85=EB=A3=8C=EC=8B=9C=20=EC=BD=9C?= =?UTF-8?q?=EB=B0=B1=20=ED=98=B8=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wshandler/wshandler.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wshandler/wshandler.go b/wshandler/wshandler.go index 4c8e523..a888470 100644 --- a/wshandler/wshandler.go +++ b/wshandler/wshandler.go @@ -605,6 +605,12 @@ func upgrade_core(sh *subhandler, conn *websocket.Conn, accid primitive.ObjectID sh.callReceiver.OnClientMessageReceived(c.sender, BinaryMessage, r) } } + if c.sender.disconnectedCallbacks != nil { + for _, f := range c.sender.disconnectedCallbacks { + f() + } + } + sh.redisSync.Del(context.Background(), accid.Hex()) sh.connWaitGroup.Done()