Repository navigation
fix(rivetkit): remove the connection of an aborted HTTP action - #5836
Conversation
This was referenced Oct 5, 2026
Contributor
|
Review. The approach is sound. A drop guard that disconnects when the caller's future is cancelled fixes the leaked connection and the never-sleeps bug. The driver tests cover both scenarios. Suggestions
Security and performance. No concerns. The guard adds negligible overhead on the normal path. Overall this looks good. The main requests are a Rust unit test and confirmation of items 2 to 4. |
eersnington
force-pushed
the
stack/fix-rivetkit-deliver-events-sent-to-hibernated-connections-before-they-reconnect-utyzksuo
branch
from
October 5, 2026 09:53
061ce65 to
775b0a7
Compare
eersnington
force-pushed
the
stack/fix-rivetkit-remove-the-connection-of-an-aborted-http-action-kukspqnv
branch
from
October 5, 2026 09:53
a453705 to
dc02d69
Compare
eersnington
merged commit Oct 5, 2026
02fd3b3
into
stack/fix-rivetkit-deliver-events-sent-to-hibernated-connections-before-they-reconnect-utyzksuo
8 of 22 checks passed
eersnington
deleted the
stack/fix-rivetkit-remove-the-connection-of-an-aborted-http-action-kukspqnv
branch
October 5, 2026 11:51
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.
A caller that left in the middle of a request kept the actor awake forever. The request's connection was never removed, so the actor always had an active connection and never idle-slept.
handle_action_fetch (registry/http.rs) connect_conn_with_request insert_existing(conn) connection registered await onConnect caller leaves here: leaked await dispatch_action caller leaves here: leaked conn.disconnect() skipped when the future is droppedGateway3 sends
ToEnvoyRequestAbortwhen a client disconnects before the response starts, and the envoy drops the request future at whicheverawaitit is on. Everything after thatawaitis skipped.DisconnectOnDropguard inactor/connection.rs. It disconnects the connection when dropped, unless it was disconnected or disarmed first.connect_with_state_and_prepareholds it across theonConnectawait, so every new connection (HTTP or WebSocket) is covered whileonConnectruns.conn.disconnect.onDisconnectruns afteronConnect, because both go through the actor's event inbox in order.engine.gateway3.This is part 2 of 2 in a stack: