Skip to content
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

net: expose context Canceled/DeadlineExceeded error #36208

Open
pascaldekloe opened this issue Dec 18, 2019 · 2 comments
Open

net: expose context Canceled/DeadlineExceeded error #36208

pascaldekloe opened this issue Dec 18, 2019 · 2 comments

Comments

@pascaldekloe
Copy link
Contributor

@pascaldekloe pascaldekloe commented Dec 18, 2019

Issue #28529 could be solved with the new error wrapping now.

What did you do?

Check for context.Canceled with errors.Is seems reasonable.

https://play.golang.org/p/-JTEZXGyfQ6

$ go version
go version go1.13.5 darwin/amd64
@dmitshur

This comment has been minimized.

Copy link
Member

@dmitshur dmitshur commented Dec 20, 2019

Thanks for making this issue.

Can you elaborate on what problem it would help solve to expose this information? What is it that cannot be done (or can be done, but inconveniently) before this is resolved, and how will it be done after?

/cc @mikioh @bradfitz @ianlancetaylor

Also /cc @bcmills who commented on the relevant issue #28529.

@pascaldekloe

This comment has been minimized.

Copy link
Contributor Author

@pascaldekloe pascaldekloe commented Dec 21, 2019

Generally speaking you want to continue the abort (by returning context.Canceled) if the context expired. Dial errors on the other hand must be reported [logged]. Maybe a retry or two?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.