Repository navigation
fix(uring): close connections when the last session handle drops - #5748
Conversation
Co-Authored-By: Codex <noreply@openai.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Merge summary for head
Arming auto-merge pinned to this head. (Written by Claude Opus 5.5) |
Problem
Dropping the last
quic::web::Sessionleft its connection alive because the QUIC driver and WebTransport capsule reader retain internal state. The regression observed a peer idle timeout instead of an application close.Closes the quest
quest/m2/uring-drop-close.md(deleted here).Approach
Count public session handles separately and initiate the existing close path when the last drops. Raw sessions close directly; WebTransport retains its capsule and critical-stream handling. Explicit close codes remain authoritative (first close wins in both the driver and the WebTransport layer).
Impact
quic::web::Sessionnow initiates an application close with code 0 (reasondropped) in raw and WebTransport modes, matching the tokio backend's implicit close.quic::Connectionstill needs an explicitclose; its doc now points atweb::Sessionfor drop-closes. The worker must remain driven to send the close, as with explicit close.Decisions
Iteration review (sub-agent, recommended options picked):
web::Sessionhandle only, not on bareConnection. ✅ Keep as is (internal driver and capsule tasks holdConnectionclones, so counting those would preserve the leak; the relay and benches always wrap inweb::Session). Alternative: split internal handles from publicConnectionhandles, a larger refactor with no current consumer.Alternatives
Counting connection or WebTransport references would also count internal driver and capsule tasks, preserving the leak.
Validation
just checkpassed after mergingmain(660 tests, 6 skipped), including the raw-drop, WebTransport capsule, and explicit-close preservation regressions over real loopback QUIC. The unpatched raw-drop test failed withTimedOut.Follow-ups
None. Maintainer decided no
releasebackport; the fix ships with the next release.(Written by GPT-6, updated by Claude Opus 5.5)
🤖 Generated with Claude Code