Repository navigation
#9944 Merge WebSocketCloseFrameHandler into WebSocketProtocolHandler … - #9967
Merged
Merged
Conversation
…in order to minimize pipeline
|
Can one of the admins verify this patch? |
normanmaurer
requested changes
Jan 27, 2020
Member
|
@netty-bot test this please |
normanmaurer
approved these changes
Jan 28, 2020
Member
|
@doom369 thanks a lot! |
He-Pin
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
Nov 17, 2026
Motivation: WebSocket close waits currently use a fixed three-second setting and a periodic tick, even while connections are not closing. Applications need to tune close-handshake waits without changing other timeout settings. Modification: Expose the positive client/server close timeout (maximum one hour) via config and the Scala and Java settings APIs. Preserve three seconds by default and for legacy config snippets. Arm a one-shot timer only while waiting for peer Close or transport closure; keep the original budget for a client transitioning between those phases. Keep the legacy stack entry points and default getter, route settings-aware callers through the configured value, use the shared Java duration converter, and document the client behavior. Result: Both endpoints honor the configured wait with no periodic work on open connections. Existing idle timeout semantics are unchanged. Timer delivery remains subject to scheduler granularity. Tests: - Strict Scala 2.13.18 compilation of the six affected production sources and three affected specifications against cached dependencies: passed. - Eight settings cases and two directional client/server close cases: passed; both directional cases fail against original-main wiring. - Targeted MiMa against the exact baseline: zero findings. - Cached Scalafmt and git diff --check: passed. - Full repository CI and cross-Scala build not run locally. References: Refs apache#1486 and Netty netty/netty#8896, netty/netty#9967 (independent Pekko implementation).
He-Pin
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
Nov 17, 2026
Motivation: Allow applications to tune the current fixed three-second close wait without changing the idle timeout or adding work to open connections. Modification: Configure the client and server close wait with Scala and Java settings and a finite positive range up to one hour. Arm one timer while closing; reuse the remaining time when an active client receives the peer Close but still waits for transport closure. Route standard stack calls through settings and remove the dead internal tick and default getter. Keep the legacy messageAPI parameter with an explicit unused annotation. Document the default, bounds and scheduler granularity. Result: Normal traffic has no periodic close check, and a client's two closing phases share one configured budget. The default remains three seconds. Tests: - Strict Scala 2.13.18 production/test compile against cached modules. - Eight settings cases and normal client/server configurable close cases passed in the first review round; the old wiring fails both. - Current focused client configurable close and shared-budget cases passed; the shared-budget case fails when the timer restarts. - Targeted MiMa with a freshly compiled source baseline reports zero. Two obsolete implementation-only symbols are intentionally removed. - Scalafmt and git diff --check passed; full CI not run locally. References: Refs apache#1486, netty/netty#8896 and netty/netty#9967 (independent implementation).
He-Pin
added a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
Nov 17, 2026
Motivation: Allow applications to tune the fixed three-second close wait without changing the idle timeout or adding work to open connections. Modification: Configure the client and server close wait with Scala and Java settings and a finite positive range up to one hour. Arm one timer while closing and reuse its remaining time after the peer Close reply. Route stack calls through settings and remove the obsolete internal stack default getter. Keep the legacy messageAPI overload and retain Tick only as an ABI symbol from 2.0.0; do not schedule or emit it. Qualify the Java getter's Scala value explicitly for cross-version compilation. Result: Open connections no longer receive periodic close checks; the client's two closing phases share one budget. The default remains three seconds. Tests: - Changed sources compiled in Scala 2.13.18; eight settings and two focused client cases passed against the rebuilt classes. - The three affected settings sources compiled on Scala 3.3.9 and 3.9.0 against published dependencies; the unqualified getter reproduced E049. - Targeted MiMa with the 2.0.0 artifact and rebuilt classes reproduced the missing Tick symbol, then reported zero problems with the fix. - Scalafmt and git diff --check passed. The cloud JDK lacks the Java 17 release symbols required by the unchanged aggregate build; full CI is not claimed locally. References: Refs apache#1486, netty/netty#8896 and netty/netty#9967 (independent implementation).
pjfanning
pushed a commit
to He-Pin/incubator-pekko-http
that referenced
this pull request
Nov 18, 2026
Motivation: Allow applications to tune the fixed three-second close wait without changing the idle timeout or adding work to open connections. Modification: Configure the client and server close wait with Scala and Java settings and a finite positive range up to one hour. Arm one timer while closing and reuse its remaining time after the peer Close reply. Route stack calls through settings and remove the obsolete internal stack default getter. Keep the legacy messageAPI overload and retain Tick only as an ABI symbol from 2.0.0; do not schedule or emit it. Qualify the Java getter's Scala value explicitly for cross-version compilation. Result: Open connections no longer receive periodic close checks; the client's two closing phases share one budget. The default remains three seconds. Tests: - Changed sources compiled in Scala 2.13.18; eight settings and two focused client cases passed against the rebuilt classes. - The three affected settings sources compiled on Scala 3.3.9 and 3.9.0 against published dependencies; the unqualified getter reproduced E049. - Targeted MiMa with the 2.0.0 artifact and rebuilt classes reproduced the missing Tick symbol, then reported zero problems with the fix. - Scalafmt and git diff --check passed. The cloud JDK lacks the Java 17 release symbols required by the unchanged aggregate build; full CI is not claimed locally. References: Refs apache#1486, netty/netty#8896 and netty/netty#9967 (independent implementation).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…in order to minimize pipeline
Motivation:
Handling of
WebSocketCloseFrameis part of websocket protocol, so it's logical to put it within theWebSocketProtocolHandler. Also, removal ofWebSocketCloseFrameHandlerwill decrease the channel pipeline.Modification:
WebSocketCloseFrameHandlercode merged intoWebSocketProtocolHandler.WebSocketCloseFrameHandlernot added to the pipeline anymoreWebSocketProtocolHandlerWebSocketProtocolHandlernow implementsChannelOutboundHandlerand implements basic methods from itResult:
WebSocketCloseFrameHandleris no longer used.Fixes #9944