retry-go icon indicating copy to clipboard operation
retry-go copied to clipboard

Not calling RetryIfFunc when Attempt(0)

Open ruijunwang opened this issue 3 years ago • 1 comments

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?

ruijunwang avatar Aug 22 '22 19:08 ruijunwang

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

simonhoss avatar Aug 25 '22 19:08 simonhoss

I agree. It's a bug.

JaSei avatar Oct 18 '22 13:10 JaSei

I wonder if this causes #83

merusso avatar Jan 16 '23 20:01 merusso