-
Notifications
You must be signed in to change notification settings - Fork 6
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
chore: add check for context cancel or timeout #82
Conversation
05a9f22
to
b25894f
Compare
b25894f
to
3dd0ce8
Compare
810cb83
to
de0f851
Compare
} | ||
time.Sleep(time.Second) | ||
} | ||
|
||
// Ensure cancelFunction is called to quiet a context leak warning | ||
cancelFunction() |
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.
nit I think this is ok to leave as is. One thing you could do is right when cancelFunction is defined could call
defer cancelFunction()
to ensure this is called when this overall function exits
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.
Ah, yes, gotcha. I'll make that change in a followup PR, thanks!
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.
yeah sounds good!
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.
Nice @pgautier404 Thanks for jumping on this!
No description provided.