This commit is contained in:
laodaming 2023-11-01 15:22:33 +08:00
parent 1948a60c29
commit 537de58afc

View File

@ -75,6 +75,9 @@ func decreaseWebsocketConnectCount(userId, guestId int64) {
select {
case websocketStat <- data:
curWsTotalCount += data.Num
if curWsTotalCount < 0 {
curWsTotalCount = 0
}
return
case <-time.After(time.Millisecond * 200):
logx.Error("decreaseWebsocketConnectCount 输入管道超时,丢弃消息")
@ -111,6 +114,9 @@ func decreaseCombineRequestCount(userId, guestId int64) {
select {
case websocketStat <- data:
curCombineTotalCount += data.Num
if curCombineTotalCount < 0 {
curCombineTotalCount = 0
}
return
case <-time.After(time.Millisecond * 200):
logx.Error("decreaseCombineRequestCount 输入管道超时,丢弃消息")
@ -165,6 +171,9 @@ func decreaseUnityRequestCount(userId, guestId int64) {
select {
case websocketStat <- data:
curUnityHandleTotalCount += data.Num
if curUnityHandleTotalCount < 0 {
curUnityHandleTotalCount = 0
}
return
case <-time.After(time.Millisecond * 200):
logx.Error("decreaseUnityRequestCount 输入管道超时,丢弃消息")