From fc48e551b7aaa0151d6874b2de232073aac1cc8f Mon Sep 17 00:00:00 2001 From: Jan-Oliver Pantel Date: Sat, 5 Jul 2025 00:13:46 +0200 Subject: [PATCH] Ignore matches with deactivated tickets --- main.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.go b/main.go index a4896c3..e571a09 100644 --- a/main.go +++ b/main.go @@ -1048,6 +1048,16 @@ func (s *grpcServer) InvokeMatchmakingFunctions(req *pb.MmfRequest, stream pb.Op } } + // This checks if any of the tickets have been deactivated while the + // MMF was running and abandons the match if this is the case. + if cfg.GetBool("OM_MATCH_ABANDON_ON_INACTIVE_TICKET") { + for _, ticketId := range ticketIdsToDeactivate { + if _, ok := tc.InactiveSet.Load(ticketId); ok { + return; + } + } + } + // Kick off deactivation logger.Tracef("deactivating tickets in %v", res.GetId()) errs := updateTicketsActiveState(ctx, logger, &tc, ticketIdsToDeactivate, store.Deactivate)