forked from External/mage
changed "already connected" state handling
This commit is contained in:
parent
b43492ba19
commit
d10385fad2
2 changed files with 7 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue