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
This commit is contained in:
Rob Winch
2019-05-16 15:49:24 -05:00
parent f2f9562a01
commit 17ddfc0fa8

View File

@@ -143,7 +143,8 @@ public class ReactiveRedisOperationsSessionRepository implements
@Override
public Mono<Void> save(RedisSession session) {
Mono<Void> result = session.saveChangeSessionId().and(session.saveDelta())
Mono<Void> result = session.saveChangeSessionId()
.then(session.saveDelta())
.and((s) -> {
session.isNew = false;
s.onComplete();