Repository navigation
fix(tokio-quiche): wake idle listener when accept stream is dropped - #2798
Closed
codeandsolder wants to merge 1 commit into
Closed
codeandsolder wants to merge 1 commit into
codeandsolder wants to merge 1 commit into
Conversation
Member
|
Closing as a duplicate of #2763. Both use the same receiver-closed future to wake an idle listener when the accept stream is dropped, with equivalent teardown regression coverage. |
codeandsolder-git-wrangler
Bot
deleted the
upstream-pr/tokio-listener-drop-wake-20261004
branch
October 7, 2026 08:43
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.
Summary
Wake an idle tokio-quiche router when its accept stream is dropped so the listener socket/address is released promptly.
Problem
The router checks
accept_sink.is_closed()when it is polled, but an otherwise idle router does not register a wakeup tied to the receiver being dropped. Dropping the accept stream can therefore leave the router task asleep while still holding the UDP socket, delaying teardown/rebind indefinitely until unrelated activity wakes it.Change
Poll a cloned sender's
closed()future alongside the router's normal work. That gives the task a wake source tied directly to receiver shutdown without changing the success path.A regression test binds a listener, drops the accept-side streams while it is idle, and verifies the same address can be rebound promptly.
The shared Rust 1.98.1 validation run passed
idle_listener_releases_socket_after_stream_drop; repository nightly formatting is clean.