0180: Expired TCP writes never wait
Status: Proposed (pending maintainer)
Context
M-HTTP.3 requires a slow request to receive 408.
Under ADR-0163's total connection deadline, the read that detects
timeout exhausts the same deadline needed to write that
response.
Decision
Reads stop at the total deadline. Writes may make one immediate
nonblocking send attempt after expiry, but never poll, retry or
wait for writable space. A short send reports
timeout. http.serve best-effort sends
408 and closes; it does not renew the deadline or promise delivery
to an unresponsive peer. Both C and interpreter use nonblocking
sockets and this same rule.
Alternatives considered
- Reject all writes after expiry: honors a stricter cutoff but makes the required 408 response impossible, even to a peer ready to receive it.
- Give error responses a fresh timeout: creates an extra blocking window and weakens the single total-deadline guarantee.
Consequences
The deadline bounds waiting rather than forbidding a final nonblocking system call. No timer, grace period or connection API is added. Loopback integration tests assert the 408 and reset behavior on both backends.