-
Notifications
You must be signed in to change notification settings - Fork 60
fix: returning comparable error on contex's cancelled errorcase #476
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
Conversation
81db13b to
dc57834
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, validate and update other places of a context usage:
$ grep "ctx.Done" -r connection.go
case <-ctx.Done():
case <-ctx.Done():
case <-ctx.Done():
|
Single comment, otherwise LGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, squash commits into a single one according to the rules:
5a216c1 to
c6bde15
Compare
|
Please, rebase the branch on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, update a link to an issue in the commit message and in the PR message:
Fixes (457)
->
Fixes #457
Returing wrapped context.Cause(ctx) error in <-ctx.Done() case. Allows compare errors using errors.Is/As. Add 3 tests errors checking comparabily. Fixes #457
c6bde15 to
35dd810
Compare
Returing wrapped context.Cause(ctx) error in <-ctx.Done() case. Allows compare errors using errors.Is/As.
Fixes #457
I didn't forget about (remove if it is not applicable):