Retry websocket connections closed with code 1001 - #140
Open
patrickswedish wants to merge 1 commit into
Open
Conversation
🟡 Heimdall Review Status
|
patrickswedish
marked this pull request as ready for review
August 1, 2026 19:26
Author
|
Checking in on this — happy to address any review feedback or rebase if needed. All 174 tests pass and the change is scoped to the |
Treat remote Going Away closures as recoverable while preserving deliberate client shutdown, with local-server regression coverage for reconnect and resubscribe.
patrickswedish
force-pushed
the
codex/retry-websocket-going-away
branch
from
August 11, 2026 13:38
0f4e849 to
8a5edfe
Compare
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.
Closes #63.
What changed
1001(Going Away) as a recoverable disconnecton_closeonce for that remote lifecycle event1001restart scenarioRoot cause
websocketsclassifies both1000and1001asConnectionClosedOK. The message handler previously exited for everyConnectionClosedOK, so a Coinbase service restart silently stopped the receive loop without notifying the caller or attempting to restore subscriptions.Validation
python -m unittest tests.websocket.test_websocket_base— 20 tests passedpython -m unittest discover -v— 174 tests passedblack --checkpasses for the three changed files after formattinggit diff --checkpassesThe new regression test uses the local WebSocket server to send status
1001, restart, and verify both the close callback and subscription restoration.