Skip to content

Commit

Permalink
increase attempts just before executing the retry fn to keep them acc…
Browse files Browse the repository at this point in the history
…urate, fixes #10
  • Loading branch information
tim-kos committed Sep 1, 2015
1 parent 5f94360 commit 41b80fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/retry_operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ RetryOperation.prototype.retry = function(err) {
}
}

this._attempts++;

var self = this;
setTimeout(function() {
self._attempts++;

if (self._operationTimeoutCb) {
self._timeout = setTimeout(function() {
self._operationTimeoutCb(self._attempts);
Expand Down

0 comments on commit 41b80fb

Please sign in to comment.