diff --git a/modules/cpr/src/main/java/org/atmosphere/container/JSR356Endpoint.java b/modules/cpr/src/main/java/org/atmosphere/container/JSR356Endpoint.java index 78f1b2738f..23e1d0bb15 100644 --- a/modules/cpr/src/main/java/org/atmosphere/container/JSR356Endpoint.java +++ b/modules/cpr/src/main/java/org/atmosphere/container/JSR356Endpoint.java @@ -66,7 +66,7 @@ public class JSR356Endpoint extends Endpoint { private AtmosphereRequest request; private final AtmosphereFramework framework; private WebSocket webSocket; - private final int webSocketWriteTimeout; + private final int webSocketIdleTimeout; private HttpSession handshakeSession; private Map> handshakeHeaders; @@ -80,9 +80,9 @@ public JSR356Endpoint(AtmosphereFramework framework, WebSocketProcessor webSocke String s = framework.getAtmosphereConfig().getInitParameter(ApplicationConfig.WEBSOCKET_IDLETIME); if (s != null) { - webSocketWriteTimeout = Integer.parseInt(s); + webSocketIdleTimeout = Integer.parseInt(s); } else { - webSocketWriteTimeout = -1; + webSocketIdleTimeout = -1; } s = framework.getAtmosphereConfig().getInitParameter(ApplicationConfig.WEBSOCKET_MAXBINARYSIZE); @@ -118,7 +118,7 @@ public void onOpen(Session session, final EndpointConfig endpointConfig) { } if (maxBinaryBufferSize != -1) session.setMaxBinaryMessageBufferSize(maxBinaryBufferSize); - if (webSocketWriteTimeout != -1) session.setMaxIdleTimeout(webSocketWriteTimeout); + if ( webSocketIdleTimeout != -1) session.setMaxIdleTimeout( webSocketIdleTimeout ); if (maxTextBufferSize != -1) session.setMaxTextMessageBufferSize(maxTextBufferSize); webSocket = new JSR356WebSocket(session, framework.getAtmosphereConfig());