Skip to content

Commit

Permalink
Add support for body-dependent retry strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
themusicroob committed Jun 21, 2016
1 parent ca04ea7 commit 0f472f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Request.prototype._tryUntilFail = function () {
if (response) {
response.attempts = this.attempts;
}
if (this.retryStrategy(err, response) && this.maxAttempts > 0) {
if (this.retryStrategy(err, response, body) && this.maxAttempts > 0) {
this._timeout = setTimeout(this._tryUntilFail.bind(this), this.retryDelay);
return;
}
Expand Down

0 comments on commit 0f472f9

Please sign in to comment.