Closed jappe999 closed 5 years ago
Maybe some sort of player removal function? That other players (or only the Czar) can remove the player in question.
I've discovered that players are removed from the game. Even when their session has expired.
The error occurs when the Czar is disconnected and no other players are in that game. The server cannot select a new Czar and the game is left with a Czar that does not exist.
The issue can be resolved by setting the CurrentCzarId
value to null in the database.
When I forcefully shutdown my PC or my session has expired while I'm in game I'm not removed from the player list. This causes the flow of the game to be disturbed.
Expected Behavior
When I forcefully shutdown my PC or my session is expired, I should be removed from the game I'm currently in.
Current Behavior
When the server does not detect that a player has left a game, the flow of the game will be disturbed. For example: If a player that has exited a game and it is assigned the role of Card Czar, the game cannot continue, because no combination is chosen.
Possible Solution
Each time the socket server is called a check for active connections can be done. This can be done by syncing the active connections with the database.
Steps to Reproduce (for bugs)
Context
Other players cannot continue playing the game when Card Czar it's session has expired.
Your Environment