Repository navigation
Handle exceptions on joined WebSocket sockets - #163
Merged
Merged
Conversation
See eclipse-vertx#157 After a successful WebSocket upgrade (101), the two joined `NetSocket`s had no `exceptionHandler` set. When a peer reset its connection, the exception propagated to `ConnectionBase#handleException` which logged at ERROR level, producing noisy misleading lines for routine events. Set `exceptionHandler` on both the client and backend `NetSocket`s. Each handler logs at trace level and closes the peer socket. Extract `sendWebSocketRequest` and `sendWebSocketResponse` methods from the `Proxy` inner class to reduce the size of `sendRequest` and `sendResponse`. Add two tests for post-upgrade socket closure: - Client closes after upgrade, backend socket is closed - Backend closes after upgrade, client socket is closed Assisted-By: Claude Opus 4.6 Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
tsegismont
added a commit
that referenced
this pull request
Oct 20, 2026
See #157 After a successful WebSocket upgrade (101), the two joined `NetSocket`s had no `exceptionHandler` set. When a peer reset its connection, the exception propagated to `ConnectionBase#handleException` which logged at ERROR level, producing noisy misleading lines for routine events. Set `exceptionHandler` on both the client and backend `NetSocket`s. Each handler logs at trace level and closes the peer socket. Extract `sendWebSocketRequest` and `sendWebSocketResponse` methods from the `Proxy` inner class to reduce the size of `sendRequest` and `sendResponse`. Add two tests for post-upgrade socket closure: - Client closes after upgrade, backend socket is closed - Backend closes after upgrade, client socket is closed Assisted-By: Claude Opus 4.6 (cherry picked from commit 6cd1c8c) Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
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.
See #157
After a successful WebSocket upgrade (101), the two joined
NetSockets had noexceptionHandlerset. When a peer reset its connection, the exception propagated toConnectionBase#handleExceptionwhich logged at ERROR level, producing noisy misleading lines for routine events.Set
exceptionHandleron both the client and backendNetSockets. Each handler logs at trace level and closes the peer socket.Extract
sendWebSocketRequestandsendWebSocketResponsemethods from theProxyinner class to reduce the size ofsendRequestandsendResponse.Add two tests for post-upgrade socket closure:
Assisted-By: Claude Opus 4.6