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

Not calling RetryIfFunc when Attempt(0) #66

Closed
ruijunwang opened this issue Aug 22, 2022 · 3 comments · Fixed by #86
Closed

Not calling RetryIfFunc when Attempt(0) #66

ruijunwang opened this issue Aug 22, 2022 · 3 comments · Fixed by #86

Comments

@ruijunwang
Copy link

From https://github.com/c1moore/retry-go/blob/063f78a88594e87168af0d800eac16839b533bcb/retry.go#L99, looks like the retryIf func is not called at all when attempt is set to 0, and I saw the same thing in my code. Is this intended or does it need to be fixed?

@simonhoss
Copy link

I have the same behavior and would expect that it retries as long as the RetryIf returns true

@JaSei
Copy link
Collaborator

JaSei commented Oct 18, 2022

I agree. It's a bug.

@merusso
Copy link

merusso commented Jan 16, 2023

I wonder if this causes #83

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

Successfully merging a pull request may close this issue.

4 participants