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

Retry() does not respect context cancellation #5

Open
CodyDWJones opened this issue Mar 11, 2021 · 2 comments
Open

Retry() does not respect context cancellation #5

CodyDWJones opened this issue Mar 11, 2021 · 2 comments

Comments

@CodyDWJones
Copy link
Contributor

A context cancellation / missed deadline is permanent, and if it happens while retrying, there is no point in making further attempts. However, Retry() continues trying even if the developer's action returns a non-nil error from Context.Err(). It also sleeps for the full duration instead of waking up immediately.

@kamilsk
Copy link

kamilsk commented Apr 25, 2021

Hi! For that reason I made a fork: https://github.com/kamilsk/retry

@CodyDWJones
Copy link
Contributor Author

I didn't know about your fork and will check that out - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants