Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
retry: add ECONNRESET support and remove obsolete argument
Browse files Browse the repository at this point in the history
  • Loading branch information
skenqbx committed Apr 24, 2015
1 parent 70fb672 commit ceeee0a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/retry.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function RetryPlugin(rail, options) {

this.connectErrors = [
'ECONNREFUSED',
'ECONNRESET',
'ETIMEDOUT'
];

Expand Down Expand Up @@ -66,7 +67,7 @@ RetryPlugin.prototype._interceptError = function(call, options, err) {
var syscall = err.syscall;

if (syscall === 'connect' && this.connectErrors.indexOf(err.code) > -1) {
call.__abort(err.code);
call.__abort();
options.retry.limit = options.retry.limit - 1;

// TODO: try to auto-correct the config
Expand Down

0 comments on commit ceeee0a

Please sign in to comment.