forked from External/mage
Some changes to server logging messages.
This commit is contained in:
parent
3cf53810d9
commit
5f85d52837
3 changed files with 61 additions and 15 deletions
|
|
@ -159,7 +159,18 @@ public class Session {
|
|||
}
|
||||
|
||||
public void userLostConnection() {
|
||||
logger.info("session disconnected for user " + userId);
|
||||
User user = UserManager.getInstance().getUser(userId);
|
||||
if (logger.isInfoEnabled()) {
|
||||
StringBuilder sb = new StringBuilder("user ");
|
||||
if (user == null) {
|
||||
sb.append("[user not found]");
|
||||
} else {
|
||||
sb.append(user.getName());
|
||||
}
|
||||
sb.append(" lost connection - userId: ").append(userId);
|
||||
sb.append(" sessionId: ").append(sessionId);
|
||||
logger.info(sb);
|
||||
}
|
||||
UserManager.getInstance().disconnect(userId, User.DisconnectReason.LostConnection);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue