diff --git a/javascript/node/selenium-webdriver/http/index.js b/javascript/node/selenium-webdriver/http/index.js index fa98557a0f73a..461fef79333ca 100644 --- a/javascript/node/selenium-webdriver/http/index.js +++ b/javascript/node/selenium-webdriver/http/index.js @@ -226,7 +226,7 @@ function sendRequest(options, onOk, onError, opt_data, opt_proxy) { }); request.on('error', function(e) { - if (e.code === 'ECONNRESET') { + if (e.code === 'ECONNRESET' || e.code === 'EPIPE') { setTimeout(function() { sendRequest(options, onOk, onError, opt_data, opt_proxy); }, 15);