From 7c884105072c7e211e8f6bca83e78d936afb42e1 Mon Sep 17 00:00:00 2001 From: Santiago Gimeno Date: Wed, 10 Feb 2016 19:51:32 +0100 Subject: [PATCH] test: fix child-process-fork-regr-gh-2847 again Windows is still sometimes failing with ECONNRESET. Bring back the handling of this error as was initially introduced in PR #4442. PR-URL: https://github.com/nodejs/node/pull/5179 Reviewed-By: Rich Trott Fixes: https://github.com/nodejs/node/issues/3635 --- test/parallel/test-child-process-fork-regr-gh-2847.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/parallel/test-child-process-fork-regr-gh-2847.js b/test/parallel/test-child-process-fork-regr-gh-2847.js index ad056426428c0d..df13b79f4e2568 100644 --- a/test/parallel/test-child-process-fork-regr-gh-2847.js +++ b/test/parallel/test-child-process-fork-regr-gh-2847.js @@ -15,6 +15,13 @@ if (!cluster.isMaster) { } var server = net.createServer(function(s) { + if (common.isWindows) { + s.on('error', function(err) { + // Prevent possible ECONNRESET errors from popping up + if (err.code !== 'ECONNRESET') + throw err; + }); + } setTimeout(function() { s.destroy(); }, 100);