You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* manages users - if a user is disconnected and 10 minutes have passed with no
18
18
* activity the user is removed
@@ -22,6 +22,9 @@
22
22
publicenumUserManager {
23
23
instance;
24
24
25
+
privatestaticfinalintSERVER_TIMEOUTS_USER_DISCONNECT_FROM_SERVER_AFTER_SECS = 3 * 60; // removes from all games and chats too (can be seen in users list with disconnected status)
26
+
privatestaticfinalintSERVER_TIMEOUTS_USER_REMOVE_FROM_SERVER_AFTER_SECS = 8 * 60; // removes from users list
Copy file name to clipboardExpand all lines: Mage.Server/src/main/java/mage/server/game/GameController.java
+7-3
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,9 @@
49
49
*/
50
50
publicclassGameControllerimplementsGameCallback {
51
51
52
+
privatestaticfinalintGAME_TIMEOUTS_CHECK_JOINING_STATUS_EVERY_SECS = 15; // checks and inform players about joining status
53
+
privatestaticfinalintGAME_TIMEOUTS_CANCEL_PLAYER_GAME_JOINING_AFTER_INACTIVE_SECS = 4 * 60; // leave player from game if it don't join and inactive on server
logger.debug("Player " + player.getName() + " (disconnected) has joined gameId: " + game.getId());
334
338
}
335
339
ChatManager.instance.broadcast(chatId, player.getName(), user.getPingInfo() + " is pending to join the game", MessageColor.BLUE, true, ChatMessage.MessageType.STATUS, null);
336
-
if (user.getSecondsDisconnected() > 240) {
340
+
if (user.getSecondsDisconnected() > GAME_TIMEOUTS_CANCEL_PLAYER_GAME_JOINING_AFTER_INACTIVE_SECS) {
341
+
// TODO: 2019.04.22 - if user playing another game on server but not joining (that's the reason?), then that's check will never trigger
337
342
// Cancel player join possibility lately after 4 minutes
0 commit comments