From c893c39ff652a3a9390773366f84cc3262d05a54 Mon Sep 17 00:00:00 2001 From: Michael Cameron Date: Wed, 18 Feb 2015 16:41:26 -0600 Subject: [PATCH] Do not wipe out current session when calling findSession with other session IDs --- .../tomcat/redissessions/RedisSessionManager.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java b/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java index 12af7308..4efef370 100644 --- a/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java +++ b/src/main/java/com/orangefunction/tomcat/redissessions/RedisSessionManager.java @@ -422,10 +422,7 @@ 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 { @@ -433,15 +430,6 @@ public Session findSession(String id) throws IOException { 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); } }