forked from External/mage
Some changes to user / session / chat / tournament handling (not all tested yet).
This commit is contained in:
parent
e8cfb2231c
commit
d3a2ba683c
13 changed files with 105 additions and 86 deletions
|
|
@ -202,13 +202,19 @@ public class Main {
|
|||
if (throwable instanceof ClientDisconnectedException) {
|
||||
// Seems like the random diconnects from public server land here and should not be handled as explicit disconnects
|
||||
// So it should be possible to reconnect to server and continue games if DisconnectReason is set to LostConnection
|
||||
//SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.Disconnected);
|
||||
//SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.Disconnected);
|
||||
SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.LostConnection);
|
||||
logger.debug("Client disconnected - " + sessionInfo + " throwable: " + throwable == null ? "null" :throwable.getMessage());
|
||||
logger.info("CLIENT DISCONNECTED - " + sessionInfo, throwable);
|
||||
if (logger.isDebugEnabled()) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
}
|
||||
else {
|
||||
SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.LostConnection);
|
||||
logger.info("Connection to client lost - " + sessionInfo + " throwable: " + (throwable == null ? "null" :throwable.getMessage()));
|
||||
else {
|
||||
SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.LostConnection);
|
||||
logger.info("CONNECTION LOST - " + sessionInfo, throwable);
|
||||
if (logger.isDebugEnabled()) {
|
||||
throwable.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue