* Some changes to game start logic (better handling for disconnected users). Changes to server logging.

This commit is contained in:
LevelX2 2014-12-08 01:30:18 +01:00
parent 5d30cf536b
commit 30869beca0
13 changed files with 132 additions and 107 deletions

View file

@ -360,18 +360,18 @@ public class SessionImpl implements Session {
}
client.showMessage("Unable to connect to server. " + message);
if (logger.isTraceEnabled()) {
t.printStackTrace();
logger.trace("StackTrace", t);
}
}
/**
*
* @param errorCall - was connection lost because of error
* @param errorCall - was connection lost because of error - ask user if he want to try to reconnect
*/
@Override
public synchronized void disconnect(boolean errorCall) {
if (isConnected()) {
logger.info("DISCONNECT still connected");
logger.info("DISCONNECT (still connected)");
sessionState = SessionState.DISCONNECTING;
}
if (connection == null || sessionState == SessionState.DISCONNECTED) {
@ -1396,6 +1396,7 @@ public class SessionImpl implements Session {
return true;
} catch (MageException ex) {
handleMageException(ex);
disconnect(true);
} catch (Throwable t) {
handleThrowable(t);
}