From ceeee0afbc53d60ad3c32ff92d13a002616fac90 Mon Sep 17 00:00:00 2001 From: Malte-Thorben Bruns Date: Fri, 24 Apr 2015 22:34:15 +0200 Subject: [PATCH] retry: add ECONNRESET support and remove obsolete argument --- lib/plugins/retry.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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