* Some changes to game start logic (better handling for disconnected users). Changes to server logging.

This commit is contained in:
LevelX2 2014-12-08 01:30:18 +01:00
parent 5d30cf536b
commit 30869beca0
13 changed files with 132 additions and 107 deletions

View file

@ -320,7 +320,14 @@ public class GameSessionPlayer extends GameSessionWatcher {
@Override
public void run() {
try {
player.quit(game);
if (game.getStartTime() == null) {
// gameController is still waiting to start the game
player.leave();
} else {
// game was already started
player.quit(game);
}
} catch (Exception ex) {
if (ex != null) {
// It seems this can happen if two threads try to end the game at the exact same time (one wins and one ends here)