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

About BackoffDelay #17

Closed
ArtanisCV opened this issue Jun 6, 2019 · 2 comments
Closed

About BackoffDelay #17

ArtanisCV opened this issue Jun 6, 2019 · 2 comments

Comments

@ArtanisCV
Copy link

I am confused about this part in BackoffDelay https://github.com/avast/retry-go/blob/master/options.go#L62 .

As n is starting from 0, why there is a -1 when computing the delay? Shouldn't it be config.delay * (1 << n)?

Thanks in advance.

@sjanota
Copy link
Contributor

sjanota commented Jul 12, 2019

You're right. It looks like the first retry is executed immediately. I'm not sure if it is on purpose or not.

@sjanota
Copy link
Contributor

sjanota commented Jul 12, 2019

I have created a PR with a fix (#19) in the case it is a bug.

@JaSei JaSei closed this as completed Jul 13, 2019
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

3 participants