mirror of
https://github.com/livekit/livekit.git
synced 2026-09-25 19:54:27 +00:00
A committed response that cannot be completed is torn down with panic(http.ErrAbortHandler): the head is on the wire, so no status can report the failure, and this is the only teardown net/http offers. HTTP/1.1 closes without the final chunk and HTTP/2 sends RST_STREAM, so a short body cannot read as whole. bridge raised it from inside the response copy loop, through a helper whose doc had to note that it does not return. It now reports a bridgeOutcome and ServeHTTP performs the teardown at the handler boundary, where the constraint that nothing may recover the sentinel is visible to a reader. The outcome replaces the (done, retryable) pair, whose four combinations only ever carried three states. No behavior change.