diff --git a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/browser/JsrBrowserDebugTool.java b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/browser/JsrBrowserDebugTool.java index 4ecd2899bee..5dabe2c6ff6 100644 --- a/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/browser/JsrBrowserDebugTool.java +++ b/jetty-websocket/javax-websocket-server-impl/src/test/java/org/eclipse/jetty/websocket/jsr356/server/browser/JsrBrowserDebugTool.java @@ -90,6 +90,7 @@ public class JsrBrowserDebugTool server.setHandler(context); ServerContainer container = WebSocketServerContainerInitializer.configureContext(context); + container.setDefaultMaxSessionIdleTimeout(5000); container.addEndpoint(JsrBrowserSocket.class); LOG.info("{} setup on port {}",this.getClass().getName(),port); diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java index 531c84284d8..afe5056aa77 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java @@ -178,6 +178,7 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp this.ioState.addListener(this); this.flusher = new Flusher(generator,endp); this.setInputBufferSize(policy.getInputBufferSize()); + this.setMaxIdleTimeout(policy.getIdleTimeout()); } @Override