diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/web/WebServer.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java index f1a282567..dc933aa00 100644 --- a/src/org/traccar/web/WebServer.java +++ b/src/org/traccar/web/WebServer.java @@ -58,7 +58,7 @@ public class WebServer { private final Config config; private final DataSource dataSource; private final HandlerList handlers = new HandlerList(); - private final SessionManager sessionManager = new HashSessionManager(); + private final SessionManager sessionManager; private void initServer() { @@ -75,6 +75,12 @@ public class WebServer { this.config = config; this.dataSource = dataSource; + sessionManager = new HashSessionManager(); + int sessionTimeout = config.getInteger("web.sessionTimeout"); + if (sessionTimeout != 0) { + sessionManager.setMaxInactiveInterval(sessionTimeout); + } + initServer(); initApi(); if (config.getBoolean("web.console")) { |