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

Missing current attempt in callback #82

Open
hornta opened this issue Oct 1, 2021 · 0 comments
Open

Missing current attempt in callback #82

hornta opened this issue Oct 1, 2021 · 0 comments

Comments

@hornta
Copy link

hornta commented Oct 1, 2021

Isn't the current attempt missing when executing this callback right here?

self._operationTimeoutCb();


I also found this line which confuses me. The readme says nothing about an option called forever in the timeouts function and I'm unsure if it's a miss in the readme or in the code.

if (options && options.forever && !timeouts.length) {

https://github.com/tim-kos/node-retry#retrytimeoutsoptions


The timeout variable is used as the timeout in a setTimeout but this line right here sets timeout to an array of size 1 but setTimeout doesn't accept an array as a second argument.

timeout = this._cachedTimeouts.slice(-1);

}, timeout);

Couldn't this cause unwanted behaviour?

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

1 participant