diff --git a/worldsrv/tournament.go b/worldsrv/tournament.go index a51bf06..2aae9c9 100644 --- a/worldsrv/tournament.go +++ b/worldsrv/tournament.go @@ -2059,17 +2059,17 @@ func (this *Tournament) OnHourTimer() { } } for sortId := range this.players { + has := false for _, tm := range this.matches { - if _, ok := tm[sortId]; !ok { - for _, v := range this.players[sortId] { - if v != nil { - logger.Logger.Errorf("比赛异常,比赛已经不存在了 %v", v.tm) - } - break - } - this.StopMatch(0, sortId) + if _, ok := tm[sortId]; ok { + has = true + break } } + if !has { + logger.Logger.Errorf("比赛异常,比赛已经不存在了 %v", sortId) + delete(this.players, sortId) + } } }