From edb09f208167bd1773c5e160769896d5814dc52b Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 22 Dec 2022 17:25:14 +0800 Subject: [PATCH 1/2] callback update --- internal/msg_gateway/gate/ws_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index 0d5869e11..129e638db 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -388,7 +388,7 @@ func (ws *WServer) delUserConn(conn *UserConn) { if err != nil { log.Error(operationID, " close err", "", "uid", uid, "platform", platform) } - callbackResp := callbackUserOffline(operationID, conn.userID, platform, conn.connID) + callbackResp := callbackUserOffline(operationID, conn.userID, int(conn.PlatformID), conn.connID) if callbackResp.ErrCode != 0 { log.NewError(operationID, utils.GetSelfFuncName(), "callbackUserOffline failed", callbackResp) } From 16a7bc63f2a3f93467fa1e750d88933d920424b0 Mon Sep 17 00:00:00 2001 From: Gordon <1432970085@qq.com> Date: Thu, 22 Dec 2022 17:37:34 +0800 Subject: [PATCH 2/2] callback update --- internal/msg_gateway/gate/ws_server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index 129e638db..e442443f9 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -388,6 +388,9 @@ func (ws *WServer) delUserConn(conn *UserConn) { if err != nil { log.Error(operationID, " close err", "", "uid", uid, "platform", platform) } + if conn.PlatformID == 0 || conn.connID == "" { + log.NewWarn(operationID, utils.GetSelfFuncName(), "PlatformID or connID is null", conn.PlatformID, conn.connID) + } callbackResp := callbackUserOffline(operationID, conn.userID, int(conn.PlatformID), conn.connID) if callbackResp.ErrCode != 0 { log.NewError(operationID, utils.GetSelfFuncName(), "callbackUserOffline failed", callbackResp)