This commit is contained in:
laodaming 2023-10-31 18:00:08 +08:00
parent 42fae2b6fc
commit 042b23c647

View File

@ -105,6 +105,12 @@ func ConsumeWebsocketStatData(ctx context.Context) {
continue
}
stat.CurWsConnectCount += data.Value
//没有连接就删除
if stat.CurWsConnectCount <= 0 {
mapUserWsStat.Delete(key)
continue
}
//保存统计
mapUserWsStat.Store(key, stat)
case TYPE_COMBINE_IMAGE_REQUEST_COUNT: //请求算法合图计数
statData, ok := mapUserWsStat.Load(key)