fix
This commit is contained in:
parent
485319d4f8
commit
8c026be22d
|
@ -96,7 +96,11 @@ func ConsumeWebsocketStatData(ctx context.Context) {
|
|||
if ok { //存在就累加
|
||||
if stat, ok := statData.(mapUserWsStatItem); ok {
|
||||
stat.CurWsConnectCount += data.Value
|
||||
mapUserWsStat.Store(key, stat)
|
||||
if stat.CurWsConnectCount == 0 { //为0则移除
|
||||
mapUserWsStat.Delete(key)
|
||||
} else {
|
||||
mapUserWsStat.Store(key, stat)
|
||||
}
|
||||
} else {
|
||||
logx.Error("断言mapUserWsStatItem错误")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user