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 cc41ea5271
commit d94d58d96b

View File

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