-
Notifications
You must be signed in to change notification settings - Fork 18k
context: DeadlineExceeded doesn't implement net.Error interface #14238
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
Comments
@Sajmani, has this ever been discussed? |
This seems like a reasonable request. On Wed, 11 May 2016, 09:14 Brad Fitzpatrick, notifications@github.com
|
Seems like a good idea to me and worth doing for Go 1.7 since context is new there. |
CL https://golang.org/cl/23256 mentions this issue. |
CL https://golang.org/cl/30370 mentions this issue. |
It already implemented the Timeout method, but implementing the full net.Error is more convenient. Fixes #14238 (again). Change-Id: Ia87f897f0f35bcb49865e2355964049227951ca6 Reviewed-on: https://go-review.googlesource.com/30370 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
It's a common pattern to test for timeout errors by asserting (a subset of) the net.Error interface and calling the Timeout method.
DeadlineExceeded timeouts should not require a special case.
The text was updated successfully, but these errors were encountered: