Skip to content

Commit

Permalink
Merge pull request #2513 from slovdahl/rename-misleading-variable-name
Browse files Browse the repository at this point in the history
Rename misleading WebSocket timeout variable
  • Loading branch information
jfarcand authored Aug 24, 2024
2 parents 7a38dce + e2b2420 commit 1529409
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 webSocketIdleTimeoutMs;
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);
webSocketIdleTimeoutMs = Integer.parseInt(s);
} else {
webSocketWriteTimeout = -1;
webSocketIdleTimeoutMs = -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 (webSocketIdleTimeoutMs != -1) session.setMaxIdleTimeout(webSocketIdleTimeoutMs);
if (maxTextBufferSize != -1) session.setMaxTextMessageBufferSize(maxTextBufferSize);

webSocket = new JSR356WebSocket(session, framework.getAtmosphereConfig());
Expand Down

0 comments on commit 1529409

Please sign in to comment.