forked from External/mage
* Some changes to game start logic (better handling for disconnected users). Changes to server logging.
This commit is contained in:
parent
5d30cf536b
commit
30869beca0
13 changed files with 132 additions and 107 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue