Skip to content

Commit

Permalink
Update retry_operation.js (#74)
Browse files Browse the repository at this point in the history
Fixed the slice operation so that this comment is true:
```
// retry forever, only keep last error
```
  • Loading branch information
chanced committed Aug 10, 2020
1 parent c402d77 commit b316bfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/retry_operation.js
Expand Up @@ -60,7 +60,7 @@ RetryOperation.prototype.retry = function(err) {
if (timeout === undefined) {
if (this._cachedTimeouts) {
// retry forever, only keep last error
this._errors.splice(this._errors.length - 1, this._errors.length);
this._errors.splice(0, this._errors.length - 1);
this._timeouts = this._cachedTimeouts.slice(0);
timeout = this._timeouts.shift();
} else {
Expand Down

0 comments on commit b316bfc

Please sign in to comment.