From 3cf2461eadb9129d57ad57b8d18ed5d2e96860ce 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. --- 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);