* Session locking - Fixed some problems with the reentrant lock.

This commit is contained in:
LevelX2 2014-12-01 17:00:26 +01:00
parent 2af52cfd3a
commit 896793b93d
4 changed files with 92 additions and 47 deletions

View file

@ -63,6 +63,7 @@ import java.net.InetAddress;
import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.Map;
import static mage.server.Session.getBasicCause;
import org.jboss.remoting.transport.bisocket.BisocketServerInvoker;
@ -213,18 +214,16 @@ public class Main {
//SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.Disconnected);
SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.LostConnection);
logger.info("CLIENT DISCONNECTED - " + sessionInfo, throwable);
if (logger.isDebugEnabled()) {
throwable.printStackTrace();
}
logger.debug("Stack Trace", throwable);
}
else {
SessionManager.getInstance().disconnect(client.getSessionId(), DisconnectReason.LostConnection);
logger.info("CONNECTION LOST - " + sessionInfo, throwable);
logger.info("LOST CONNECTION - " + sessionInfo);
if (logger.isDebugEnabled()) {
if (throwable == null) {
logger.debug("Lease expired");
logger.debug("- cause: Lease expired");
} else {
throwable.printStackTrace();
logger.debug(" - cause: " + Session.getBasicCause(throwable).toString());
}
}
}