-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/net/http2: add Transport.WriteByteTimeout #48830
Comments
Change https://golang.org/cl/354431 mentions this issue: |
This proposal has been added to the active column of the proposals project |
Perhaps a better name is |
Based on the discussion above, this proposal seems like a likely accept. |
No change in consensus, so accepted. 🎉 |
Add a Transport-level knob to set a timeout for writes to net.Conns. If a write exceeds the timeout without making any progress (at least one byte written), the connection is closed. Fixes golang/go#48830. Change-Id: If0f57996d11c92bced30e07d1e238cbf8994acb4 Reviewed-on: https://go-review.googlesource.com/c/net/+/354431 Trust: Damien Neil <[email protected]> Run-TryBot: Damien Neil <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
There are currently two ways to detect a broken HTTP/2 connection:
Read
orWrite
to thenet.Conn
fails.ReadIdleTimeout
, and no response is received from the subsequent ping withinPingTimeout
.Pings are a reliable way to detect a broken connection (with the fix for #48810), but there are times when it would be nice to passively detect an unresponsive peer without needing to actively ping them.
I propose adding an additional knob to
http2.Transport
:Unlike
ReadIdleTimeout
,WriteTimeout
will apply only at the time we try to write to a connection. Unlike per-request timeouts,WriteTimeout
applies to the connection as a whole.The text was updated successfully, but these errors were encountered: