diff options
author | Alexander Early <alex@npmjs.com> | 2019-02-13 17:14:55 -0800 |
---|---|---|
committer | Alexander Early <alex@npmjs.com> | 2019-02-13 17:14:58 -0800 |
commit | 34694aab75b2d7e0dc989de8ef63e71b4ecb7760 (patch) | |
tree | 00d33af5885beaeaab77ca1528a476b33ac7e50c /lib/retry.js | |
parent | ec2867d3b6df6ea2e8292fa75679b15731e7d2df (diff) | |
download | async-fix-retry-interval-func.tar.gz |
fix: send proper retry count to retry's interaval funcfix-retry-interval-func
Closes #1578
Diffstat (limited to 'lib/retry.js')
-rw-r--r-- | lib/retry.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/retry.js b/lib/retry.js index 5ef6971..55dce0a 100644 --- a/lib/retry.js +++ b/lib/retry.js @@ -122,7 +122,7 @@ export default function retry(opts, task, callback) { if (err && attempt++ < options.times && (typeof options.errorFilter != 'function' || options.errorFilter(err))) { - setTimeout(retryAttempt, options.intervalFunc(attempt)); + setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); } else { callback(err, ...args); } |