This commit is contained in:
laodaming 2023-10-31 17:56:53 +08:00
parent 8434bd1d95
commit 42fae2b6fc

View File

@ -44,6 +44,10 @@ func (l *GetStatLogic) GetStat(req *types.GetStatReq, userinfo *auth.UserInfo) (
statData, ok := mapUserWsStat.Load(key)
if ok { //存在就累加
if stat, ok := statData.(mapUserWsStatItem); ok {
//连接数等于0的用户就不返回
if stat.CurWsConnectCount == 0 {
return true
}
currentWebsocketConnectCount += stat.CurWsConnectCount
currentRequestCombineApiCount += stat.CurCombineCount
} else {