Missing current attempt in callback
Isn't the current attempt missing when executing this callback right here?
https://github.com/tim-kos/node-retry/blob/b8e26ea7adda3f11c19086a762d15e95521f3e4e/lib/retry_operation.js#L110
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.
https://github.com/tim-kos/node-retry/blob/b8e26ea7adda3f11c19086a762d15e95521f3e4e/lib/retry.js#L37
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.
https://github.com/tim-kos/node-retry/blob/b8e26ea7adda3f11c19086a762d15e95521f3e4e/lib/retry_operation.js#L65 https://github.com/tim-kos/node-retry/blob/b8e26ea7adda3f11c19086a762d15e95521f3e4e/lib/retry_operation.js#L86
Couldn't this cause unwanted behaviour?