Skip to content

Commit d94d58d

Browse files
committed
Redis save uses then
We need to ensure that the session id is changed before we save the changes. Otherwise the rename of the session id will override the changes we just made. Fixes: gh-1428
1 parent cc41ea5 commit d94d58d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-session-data-redis/src/main/java/org/springframework/session/data/redis/ReactiveRedisOperationsSessionRepository.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ public Mono<RedisSession> createSession() {
143143

144144
@Override
145145
public Mono<Void> save(RedisSession session) {
146-
Mono<Void> result = session.saveChangeSessionId().and(session.saveDelta())
146+
Mono<Void> result = session.saveChangeSessionId()
147+
.then(session.saveDelta())
147148
.and((s) -> {
148149
session.isNew = false;
149150
s.onComplete();

0 commit comments

Comments
 (0)