See gh-1111
This commit is contained in:
Vedran Pavic
2018-09-10 17:02:33 +02:00
parent d5da38f2e0
commit 57955b7d7b

View File

@@ -151,13 +151,10 @@ public class ReactiveRedisOperationsSessionRepository implements
if (session.isNew) {
return result;
}
else if (session.hasChangedSessionId()) {
String sessionKey = getSessionKey(session.originalSessionId);
return this.sessionRedisOperations.hasKey(sessionKey)
.flatMap((exists) -> exists ? result : Mono.empty());
}
else {
String sessionKey = getSessionKey(session.getId());
String sessionKey = getSessionKey(
session.hasChangedSessionId() ? session.originalSessionId
: session.getId());
return this.sessionRedisOperations.hasKey(sessionKey)
.flatMap((exists) -> exists ? result : Mono.empty());
}