From 1c9cd592bd62f68ef4c690073cc3bf21641c170d Mon Sep 17 00:00:00 2001 From: Patrick Hulin Date: Thu, 9 Jan 2020 23:33:38 -0500 Subject: [PATCH] Send message to client instead of forcing rejoin if player is still connected. --- .../main/java/mage/server/game/GameController.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Mage.Server/src/main/java/mage/server/game/GameController.java b/Mage.Server/src/main/java/mage/server/game/GameController.java index a68a473fea..23f03c2aba 100644 --- a/Mage.Server/src/main/java/mage/server/game/GameController.java +++ b/Mage.Server/src/main/java/mage/server/game/GameController.java @@ -333,9 +333,14 @@ public class GameController implements GameCallback { // TODO: workaround to fix not started games in tourneys, need to find out real reason if (gameSessions.get(player.getId()) == null) { // join the game because player has not joined are was removed because of disconnect - user.removeConstructing(player.getId()); - GameManager.instance.joinGame(game.getId(), user.getId()); - logger.warn("Forced join of player " + player.getName() + " (" + user.getUserState() + ") to gameId: " + game.getId()); + if (user.isConnected()) { + user.ccGameStarted(game.getId(), player.getId()); + logger.warn("Player " + player.getName() + " (missed message) has joined gameId: " + game.getId()); + } else { + user.removeConstructing(player.getId()); + GameManager.instance.joinGame(game.getId(), user.getId()); + logger.warn("Forced join of player " + player.getName() + " (" + user.getUserState() + ") to gameId: " + game.getId()); + } ChatManager.instance.broadcast(chatId, player.getName(), user.getPingInfo() + " is forced to join the game (waiting ends after " + GAME_TIMEOUTS_CANCEL_PLAYER_GAME_JOINING_AFTER_INACTIVE_SECS + " secs)",