Repository navigation
fix(moq-transport): treat unmapped stream reset codes as stream errors - #317
Open
bmertens-datum wants to merge 1 commit into
Open
bmertens-datum wants to merge 1 commit into
bmertens-datum wants to merge 1 commit into
Conversation
Over raw QUIC, web_transport_quinn::Session::raw still maps RESET_STREAM and STOP_SENDING codes through error_from_http3. An ordinary MoQT code such as 5 has no WebTransport mapping, so it arrives as ReadError::InvalidReset or WriteError::InvalidStopped. is_stream_error() did not list those variants, so is_session_fatal() returned true and run_streams() closed the whole session when a peer reset a single data stream. Count InvalidReset and InvalidStopped as stream errors, like Reset and Stopped. Fixes cloudflare#316 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #316.
What this changes
Over raw QUIC,
web_transport_quinn::Session::rawstill mapsRESET_STREAMandSTOP_SENDINGcodes througherror_from_http3. A MoQT code with no WebTransport mapping (for example, 5) therefore arrives asReadError::InvalidResetorWriteError::InvalidStopped.SessionError::is_stream_error()didn't list those variants, sois_session_fatal()closed the whole session when a peer ended one stream.This PR counts both variants as stream errors, the same as
ResetandStopped. It also adds a unit test covering both.Testing
cargo fmt --checkandcargo clippy --no-depsare clean.moq-relay-ietf'sproducer::tests::cancelled_remote_subscribe_*. Those fail intermittently on unmodifiedmaintoo (1 run in 3 on bothmainand this branch, at the same 2 s timeout), so the failure is unrelated to this change.moqts://reproduced Raw-QUIC stream reset with an unmapped code closes the whole session (InvalidReset treated as session-fatal) #316 against a relay built fromdraft-18-dev. With this change applied, the session stays up and a browser (@moq/watch0.6.2) plays its 1080p25 broadcast through the relay. The relay now logs onlyfailed to serve stream ... invalid RESET_STREAM: 5as a warning.InvalidStoppedhalf is from reading the code; the end-to-end test only exercised resets.🤖 Generated with Claude Code