You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The contract for ctxhttp.Do states that if a request timed out or got
canceled, the error returned will be equal to ctx.Err(). This is true
for Go 1.6 but is broken in 1.7rc1.
I wrote a quick little program where the request always times out. It
prints the returned error, the ctx.Err(), and whether they are equal.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
The contract for
ctxhttp.Do
states that if a request timed out or gotcanceled, the error returned will be equal to
ctx.Err()
. This is truefor Go 1.6 but is broken in 1.7rc1.
I wrote a quick little program where the request always times out. It
prints the returned error, the
ctx.Err()
, and whether they are equal.Full code:
What did you expect to see?
Expected output:
This works as expected in 1.6.
What did you see instead?
Output in 1.7rc1:
This fails even if
net/context
is switched to Go 1.7'scontext
package.The text was updated successfully, but these errors were encountered: