Repository navigation
fix(rivetkit-core): close drained connections with ws.going_away - #5867
Open
eersnington wants to merge 2 commits into
Open
eersnington wants to merge 2 commits into
eersnington wants to merge 2 commits into
Conversation
Contributor
Review: close drained connections with
|
This was referenced Oct 12, 2026
eersnington
added this pull request to stack #5872
October 13, 2026 18:06
eersnington
force-pushed
the
fix/drain-going-away-close-reason
branch
2 times, most recently
from
October 13, 2026 21:10
120df78 to
2b2bdf1
Compare
eersnington
removed this pull request from stack #5872
October 13, 2026 21:11
eersnington
changed the base branch from
fix/client-retry-actor-ready-timeout
to
fix/gateway-close-without-envoy-ack
October 13, 2026 21:11
eersnington
added this pull request to stack #5875
October 13, 2026 21:11
eersnington
force-pushed
the
fix/drain-going-away-close-reason
branch
from
October 13, 2026 21:18
2b2bdf1 to
adab4ef
Compare
eersnington
force-pushed
the
fix/drain-going-away-close-reason
branch
from
October 14, 2026 20:40
adab4ef to
924f9e0
Compare
eersnington
removed this pull request from stack #5875
October 14, 2026 20:40
eersnington
added this pull request to stack #5879
October 14, 2026 20:40
This was referenced Oct 14, 2026
eersnington
force-pushed
the
fix/drain-going-away-close-reason
branch
from
October 16, 2026 23:44
924f9e0 to
3746e2c
Compare
This branch has not been deployed
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.
On a runner drain, the actor closed client WebSockets with code
1000and no reason. Clients could not tell a drain from a normal close, so in-flight actions rejected with an unstructured error.Connection closed (code: 1000), no group or codews.going_awayconn.onErrorActorContext::disconnect_transport_onlyinrivetkit-rust/packages/rivetkit-core/src/actor/connection.rscloses with thews.going_awayreason once the actor has started to shut down (actor_aborted()).rivetkit-rust/packages/rivetkit-core/src/registry/websocket.rssends code1001for that reason. Other closes keep1000.ws.going_awayas reconnect-only (rivetkit-typescript/packages/rivetkit/src/client/lifecycle-errors.ts).conn.onErroris not called for a lifecycle close that the client recovers from by reconnecting. That close is a state change, whichonCloseand the connection status already report. Without this, every sleep and drain would callonError.onDisconnecthook, so the hook runs once.tests/driver/actor-conn-drain.test.ts. It drains a runtime while an action runs, and checks that the action rejects withws.going_away,onErroris not called, andonDisconnectruns once. The driver runtime fixture drains on SIGTERM whenRIVETKIT_TEST_DRAIN_ON_SIGTERM=1.This is part 3 of 6 in a stack: