New check for recent edge case where the matchmaking broke due to a game being stuck on open.

This commit is contained in:
Vari 2025-06-17 21:18:17 +02:00
parent 2619344f75
commit b92c88df09

View File

@ -368,7 +368,8 @@ protected function removeUserFromGame(User $user, Game $game)
{
$game->players()->detach($user);
if($game->players->count() !== 0)
// Delete the game if the creator deletes themselfes sice we had one case where the matchmaking broke due to a game being stuck like this.
if($game->players->count() !== 0 && $game->creator_user_id !== $user->id)
return;
$game->delete();