Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename misleading WebSocket timeout variable #2513

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading