mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
Handled null pointer exception for "info about player not joined yet"
This commit is contained in:
parent
f4108f4e72
commit
368858cc95
1 changed files with 75 additions and 71 deletions
|
|
@ -375,7 +375,11 @@ public class GameController implements GameCallback {
|
|||
logger.debug("Player " + player.getName() + " (disconnected) has joined gameId: " + game.getId());
|
||||
}
|
||||
Session session = SessionManager.getInstance().getSession(user.getSessionId());
|
||||
if (session != null) {
|
||||
ChatManager.getInstance().broadcast(chatId, user, session.getPingInfo() + " is pending to join the game", MessageColor.BLUE, true, ChatMessage.MessageType.STATUS);
|
||||
} else {
|
||||
logger.debug("Player " + player.getName() + " - not possible to get session gameId: " + game.getId());
|
||||
}
|
||||
if (user.getSecondsDisconnected() > 240) {
|
||||
// Cancel player join possibility lately after 4 minutes
|
||||
logger.debug("Player " + player.getName() + " - canceled game (after 240 seconds) gameId: " + game.getId());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue