diff --git a/Mage.Common/src/mage/remote/Session.java b/Mage.Common/src/mage/remote/Session.java index 3b1657484b..9eb5d69192 100644 --- a/Mage.Common/src/mage/remote/Session.java +++ b/Mage.Common/src/mage/remote/Session.java @@ -267,6 +267,7 @@ public class Session { class CallbackHandler implements InvokerCallbackHandler { @Override public void handleCallback(Callback callback) throws HandleCallbackException { + logger.info("callback handler"); client.processCallback((ClientCallback)callback.getCallbackObject()); } } diff --git a/Mage.Server/src/main/java/mage/server/Session.java b/Mage.Server/src/main/java/mage/server/Session.java index d5a72b048f..0a025f3d73 100644 --- a/Mage.Server/src/main/java/mage/server/Session.java +++ b/Mage.Server/src/main/java/mage/server/Session.java @@ -75,8 +75,12 @@ public class Session { if (user.getHost().equals(host)) { if (user.getSessionId().isEmpty()) logger.info("Reconnecting session for " + userName); - else - throw new MageException("This machine is already connected"); + else { + //throw new MageException("This machine is already connected"); + //disconnect previous one + logger.info("Disconnecting another user instance: " + userName); + UserManager.getInstance().disconnect(user.getId()); + } } else { throw new MageException("User name already in use");