diff --git a/lib/plugins/retry.js b/lib/plugins/retry.js index f565ba8..0ad9376 100644 --- a/lib/plugins/retry.js +++ b/lib/plugins/retry.js @@ -14,6 +14,7 @@ function RetryPlugin(rail, options) { this.connectErrors = [ 'ECONNREFUSED', + 'ECONNRESET', 'ETIMEDOUT' ]; @@ -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