mirror of
https://github.com/correl/mage.git
synced 2024-11-28 19:19:55 +00:00
fix a nullcheck of an Optional..
This commit is contained in:
parent
f19a5144d7
commit
eeaf2284cd
1 changed files with 1 additions and 1 deletions
|
@ -26,7 +26,7 @@ public enum SessionManager {
|
|||
logger.trace("Session with sessionId " + sessionId + " is not found");
|
||||
return Optional.empty();
|
||||
}
|
||||
if (session.getUserId() != null && UserManager.instance.getUser(session.getUserId()) == null) {
|
||||
if (session.getUserId() != null && !UserManager.instance.getUser(session.getUserId()).isPresent()) {
|
||||
logger.error("User for session " + sessionId + " with userId " + session.getUserId() + " is missing. Session removed.");
|
||||
// can happen if user from same host signs in multiple time with multiple clients, after he disconnects with one client
|
||||
disconnect(sessionId, DisconnectReason.ConnectingOtherInstance);
|
||||
|
|
Loading…
Reference in a new issue