Skip to main content

stop_error

Function stop_error 

Source
fn stop_error(outcome: Result<(), TransportError>) -> Option<ProxyError>
Expand description

The one StopWatcher outcome that ends a stream.

Only an explicit peer STOP_SENDING is terminal. Ok(()) cannot fire on a live stream — quinn reports it only once the send state is gone — and treating it as end-of-stream would race the FIN path’s own send.finish(). A lost connection is already the read side’s business and every pipe already has a teardown for it. Everything that is not a STOP_SENDING therefore retires the watcher and the loop carries on byte-for-byte as before.

This is what makes the watcher safe on a control stream, where an idle stream is MoQT’s normal steady state: idleness never resolves stopped(), and no outcome except the peer’s own decision can tear a healthy session down.