From 424c56949642d5187b55a7139bc1f00ac8a01c37 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);