Skip to content

fix(spool): treat client hangup after full body as complete - #41

Merged
ravi-pplx merged 1 commit into
pplx/mainfrom
fix/spool-complete-client-disconnect
Nov 13, 2026
Merged

ravi-pplx merged 1 commit into
pplx/mainfrom
fix/spool-complete-client-disconnect

Conversation

@ravi-pplx

Copy link
Copy Markdown

A coalesced reader that has sent the full declared Content-Length still waits for the fill to commit before returning. Clients that hang up as soon as they have the body (the common case) cancel that wait, so the handler logs Failed to serve shared response ... context canceled at error level for a response that was delivered in full.

This returns success in that case. A client that disconnects before the full body is sent still gets the context error, and fill failures seen while the client is connected are unchanged.

A coalesced reader that has already sent the whole declared Content-Length
waits for the fill to commit before returning. If the client hangs up in that
window, the reader reported context.Canceled and the handler logged a served
response as a failure. Return success when the declared body was fully sent;
earlier disconnects still return the context error.
@ravi-pplx
ravi-pplx marked this pull request as ready for review November 13, 2026 04:45
@ravi-pplx
ravi-pplx merged commit d724dd6 into pplx/main Nov 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant