fix
This commit is contained in:
parent
8434bd1d95
commit
42fae2b6fc
|
@ -44,6 +44,10 @@ func (l *GetStatLogic) GetStat(req *types.GetStatReq, userinfo *auth.UserInfo) (
|
||||||
statData, ok := mapUserWsStat.Load(key)
|
statData, ok := mapUserWsStat.Load(key)
|
||||||
if ok { //存在就累加
|
if ok { //存在就累加
|
||||||
if stat, ok := statData.(mapUserWsStatItem); ok {
|
if stat, ok := statData.(mapUserWsStatItem); ok {
|
||||||
|
//连接数等于0的用户就不返回
|
||||||
|
if stat.CurWsConnectCount == 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
currentWebsocketConnectCount += stat.CurWsConnectCount
|
currentWebsocketConnectCount += stat.CurWsConnectCount
|
||||||
currentRequestCombineApiCount += stat.CurCombineCount
|
currentRequestCombineApiCount += stat.CurCombineCount
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user