fn synthesized_reset_code(err: &ProxyError) -> u64Expand description
The application error code to reset a forwarded data stream with when
the source read failed for a reason that is not a peer RESET_STREAM.
0x3 (SESSION_CLOSED on drafts 11-19) for a connection-level failure —
literally true when the relay dies mid-subgroup, and the code a real
publisher would send. 0x0 (INTERNAL_ERROR) for everything else, which
is verbatim what a proxy-internal failure is. Deliberately not
0x1 CANCELLED: its text asserts a control-plane event that never
happened and points the receiver at a PUBLISH_DONE that will never
arrive.
The 0x3 arm is unreachable through the QUIC transport today, and
that is a defect one level down, not here.
moqtap-client/src/transport/quic.rs:87-92 maps quinn::ReadError with
one typed arm — Reset(code) — and collapses everything else, including
ReadError::ConnectionLost(_), into TransportError::Read(String).
Nothing in the workspace ever constructs TransportError::ConnectionLost
from a real read, so a relay that dies mid-subgroup arrives here as
Read(..) and is reset with 0x0 rather than 0x3. The stream is still
reset rather than FINed, which is the substance of the guarantee —
a truncated group never looks complete — and only the code is less
specific than it should be. Closing it is one arm
in that From impl (ReadError::ConnectionLost(_) => TransportError::ConnectionLost), in a crate this one does not own.