Reverted changes on Session locking.

This commit is contained in:
LevelX2 2018-01-28 23:25:16 +01:00
parent 7f17011bf0
commit 5d7532dff2
2 changed files with 29 additions and 18 deletions

View file

@ -125,7 +125,6 @@ public enum SessionManager {
public void disconnect(String sessionId, DisconnectReason reason) {
Session session = sessions.get(sessionId);
if (session != null) {
boolean lockWasSet = session.setLock();
if (!sessions.containsKey(sessionId)) {
// session was removed meanwhile by another thread so we can return
return;
@ -149,9 +148,7 @@ public enum SessionManager {
default:
logger.trace("endSession: unexpected reason " + reason.toString() + " - sessionId: " + sessionId);
}
if (lockWasSet) {
session.unlock();
}
}
}