From 5721bb31c804dec924ca256928fac00f49ef3124 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Thu, 2 Nov 2023 15:41:04 +0800 Subject: [PATCH] fix --- server/websocket/internal/logic/ws_statistics.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/websocket/internal/logic/ws_statistics.go b/server/websocket/internal/logic/ws_statistics.go index d408e488..76eba02d 100644 --- a/server/websocket/internal/logic/ws_statistics.go +++ b/server/websocket/internal/logic/ws_statistics.go @@ -226,13 +226,13 @@ func ConsumeWebsocketStatData() { if !ok { continue } - curCombineTotalCount += data.Num //存在 stat, ok := statData.(mapUserWsStatItem) if !ok { logx.Error("断言mapUserWsStatItem错误") continue } + curCombineTotalCount += data.Num stat.CurCombineCount += data.Num //保存统计 mapUserWsStat.Store(key, stat) @@ -240,13 +240,13 @@ func ConsumeWebsocketStatData() { if !ok { continue } - curUnityHandleTotalCount += data.Num //存在 stat, ok := statData.(mapUserWsStatItem) if !ok { logx.Error("断言mapUserWsStatItem错误") continue } + curUnityHandleTotalCount += data.Num stat.CurUnityHandleCount += data.Num //保存统计 mapUserWsStat.Store(key, stat) @@ -254,13 +254,13 @@ func ConsumeWebsocketStatData() { if !ok { continue } - combineErrTotalCount += data.Num //存在 stat, ok := statData.(mapUserWsStatItem) if !ok { logx.Error("断言mapUserWsStatItem错误") continue } + combineErrTotalCount += data.Num stat.CombineErrCount += data.Num //保存统计 mapUserWsStat.Store(key, stat) @@ -268,13 +268,13 @@ func ConsumeWebsocketStatData() { if !ok { continue } - unityErrTotalCount += data.Num //存在 stat, ok := statData.(mapUserWsStatItem) if !ok { logx.Error("断言mapUserWsStatItem错误") continue } + unityErrTotalCount += data.Num stat.UnityErrCount += data.Num //保存统计 mapUserWsStat.Store(key, stat)