Repository navigation
fix(qmux): release stream waiters at terminal teardown - #437
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Drop retained stream channel senders and serialize registration against terminal cleanup so unfinished streams drain and close while Session handles remain alive. Co-Authored-By: GPT-6 <noreply@openai.com>
# Conflicts: # rs/qmux/src/session.rs
|
Merged Rechecked against moq-dev/moq#5762 merged with current moq
moq-dev/moq#5762 consumes this through a qmux patch release and a version bump, not a (Written by Claude Opus 5.5) |
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe shared Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
qmux 0.6.5 (moq-dev/web-transport#437) ends receive-stream reads at session teardown, which the close-tail drain relies on. It uses trait API from web-transport-trait 0.5.1, so the lockfile moves that too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve conflicts with moq-dev#437 and moq-dev#453: - rs/qmux/src/session.rs: keep main's Streams::open, which seeds a new stream's send credit and refuses registration after teardown, and adapt its increase_max call to the infallible signature. - quest/a0/README.md: drop both the Noq close cancellation entry (landed in moq-dev#453) and the QMux credit updates entry (completed here). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closing a session with an unfinished stream leaves
read_chunk,RecvStream::closed, andSendStream::closedpending while anySessionhandle remains alive. The backend exits, but the shared stream table still owns their channel senders. A receiver can consume all buffered bytes and then wait forever instead of observing closure. This blocks the no-timeout receive drain in moq-dev/moq#5762.Clear both stream tables at terminal reader teardown, closing send credit and releasing channel senders. Serialize local registration against the same terminal flag so an open that claimed credit before teardown cannot restore a sender afterwards. Buffered data and received FINs remain readable. Public API and wire format are unchanged; no version bump or release is included.
The exact TCP reproducer also fails on main c2e93e4, close draft #412 (82527d2), and counter draft #435 (5a9c692). Their 0.5 backports #413/#436 and the socket-stat descriptor teardown quest address separate behavior.
Validation:
a_closed_publisher_session_resumes_on_the_next_starttest passes in 2.565s with an isolated temporary source override on moq#5762. Its branch, config, and lockfile remain unchanged.just fix,just check, andjust testpass on clean head 601e7fb. Checks include native/WASM clippy and feature powersets; tests include 378 Rust tests/doctests, 158 TypeScript tests, and both Rust/TypeScript WebSocket interop tests.moq-dev/moq#5762 still needs this fix reviewed and merged, a published qmux release containing it, then a dependency update and clean full gates/interop. This PR does not publish or pin unpublished code.
(written by GPT-6)