Skip to content

Commit

Permalink
Rename misleading WebSocket timeout variable
Browse files Browse the repository at this point in the history
  • Loading branch information
slovdahl committed Aug 15, 2024
1 parent 7a38dce commit a58b2fb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, List<String>> handshakeHeaders;

Expand All @@ -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);
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit a58b2fb

Please sign in to comment.