修复补羊匹配卡死问题

This commit is contained in:
liwei1dao 2023-12-15 14:23:00 +08:00
parent 3401f524e8
commit 54087998b4
2 changed files with 28 additions and 29 deletions

View File

@ -28,15 +28,7 @@ func (this *apiComp) RaceMatchCancel(session comm.IUserSession, req *pb.ParkourR
return return
} }
if info.State != pb.RaceTeamState_matching { if info.State == pb.RaceTeamState_matching {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: "no matching!",
}
return
}
if req.Rtype == pb.RaceType_ordinary { if req.Rtype == pb.RaceType_ordinary {
if err = this.module.matchTrain.CancelMatch(session.GetUserId()); err != nil { if err = this.module.matchTrain.CancelMatch(session.GetUserId()); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
@ -66,6 +58,7 @@ func (this *apiComp) RaceMatchCancel(session comm.IUserSession, req *pb.ParkourR
} }
return return
} }
}
session.SendMsg(string(this.module.GetType()), "racematchcancel", &pb.ParkourRaceMatchCancelResp{}) session.SendMsg(string(this.module.GetType()), "racematchcancel", &pb.ParkourRaceMatchCancelResp{})
return return
} }

View File

@ -23,6 +23,12 @@ func (this *apiComp) CreateCheck(session comm.IUserSession, req *pb.UserCreateRe
// Title: pb.ErrorCode_UserNickSensitive.ToString(), // Title: pb.ErrorCode_UserNickSensitive.ToString(),
// } // }
// } // }
if req.Gender == 0 || req.Skin == "" {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_UserNickNameEmpty,
Title: pb.ErrorCode_UserNickNameEmpty.ToString(),
}
}
return return
} }