Ensure Undertow session timeout is set correctly

Assume that Undertow uses -1 for "no expiry".

See gh-2084
pull/2090/merge
Phillip Webb 10 years ago
parent 083f9757cd
commit 4bfabfcf29

@ -337,7 +337,8 @@ public class UndertowEmbeddedServletContainerFactory extends
DeploymentManager manager = Servlets.defaultContainer().addDeployment(deployment);
manager.deploy();
SessionManager sessionManager = manager.getDeployment().getSessionManager();
sessionManager.setDefaultSessionTimeout(getSessionTimeout());
int sessionTimeout = (getSessionTimeout() > 0 ? getSessionTimeout() : -1);
sessionManager.setDefaultSessionTimeout(sessionTimeout);
return manager;
}

Loading…
Cancel
Save