Skip to content

Commit

Permalink
Do not wipe out current session when calling findSession with other s…
Browse files Browse the repository at this point in the history
…ession IDs
  • Loading branch information
michaelcameron committed Feb 18, 2015
1 parent 14dfbc8 commit c893c39
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -422,26 +422,14 @@ public Session findSession(String id) throws IOException {
RedisSession session = null;

if (null == id) {
currentSessionIsPersisted.set(false);
currentSession.set(null);
currentSessionSerializationMetadata.set(null);
currentSessionId.set(null);
return null;
} else if (id.equals(currentSessionId.get())) {
session = currentSession.get();
} else {
byte[] data = loadSessionDataFromRedis(id);
if (data != null) {
DeserializedSessionContainer container = sessionFromSerializedData(id, data);
session = container.session;
currentSession.set(session);
currentSessionSerializationMetadata.set(container.metadata);
currentSessionIsPersisted.set(true);
currentSessionId.set(id);
} else {
currentSessionIsPersisted.set(false);
currentSession.set(null);
currentSessionSerializationMetadata.set(null);
currentSessionId.set(null);
}
}

Expand Down

0 comments on commit c893c39

Please sign in to comment.