Game ends when players leaves game

When a player leaves the game, the game ends. What can I do to fix this?