fix(multiplayer): fence recovered arena identity

This commit is contained in:
Josh Creek
2026-09-01 21:21:10 +01:00
parent 701d7a9a2e
commit 3eb47bb9d3
3 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ func (w Worker) RunOnce(ctx context.Context) (bool, error) {
func validateRecoveredAllocation(request domain.AllocationRequest, result agones.AllocatedServer) error {
allocation := result.Allocation
if result.Endpoint == "" || allocation.State != domain.ServerAllocated || allocation.AllocationID != request.AllocationID || allocation.MatchID != request.MatchID || allocation.ServerID == "" || allocation.Region != request.Region || allocation.Build != request.Build || allocation.Protocol != request.Protocol || allocation.Transport != request.Transport {
if result.Endpoint == "" || allocation.State != domain.ServerAllocated || allocation.AllocationID != request.AllocationID || allocation.MatchID != request.MatchID || allocation.ServerID == "" || allocation.Region != request.Region || allocation.Build != request.Build || allocation.Protocol != request.Protocol || allocation.Transport != request.Transport || allocation.ArenaPath != request.ArenaPath {
return fmt.Errorf("recovered allocation does not match request")
}
return nil