Fix test failure in WebSessionIntegrationTests

This commit is contained in:
Rossen Stoyanchev
2016-10-13 18:02:41 -04:00
parent d4446c79b6
commit 960cc42060
2 changed files with 17 additions and 12 deletions

View File

@@ -137,10 +137,13 @@ public class DefaultWebSessionManager implements WebSessionManager {
protected Mono<Void> saveSession(ServerWebExchange exchange, WebSession session) {
Assert.isTrue(!session.isExpired(), "Sessions are checked for expiration and have their " +
"access time updated when first accessed during request processing. " +
"However this session is expired meaning that maxIdleTime elapsed " +
"since then and before the call to session.save().");
if (session.isExpired()) {
return Mono.error(new IllegalStateException(
"Sessions are checked for expiration and have their " +
"access time updated when first accessed during request processing. " +
"However this session is expired meaning that maxIdleTime elapsed " +
"since then and before the call to session.save()."));
}
if (!session.isStarted()) {
return Mono.empty();