Skip to content

Commit 7c88410

Browse files
santigimenorvagg
authored andcommitted
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: #5179 Reviewed-By: Rich Trott <[email protected]> Fixes: #3635
1 parent eb6d073 commit 7c88410

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/parallel/test-child-process-fork-regr-gh-2847.js

+7
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ if (!cluster.isMaster) {
1515
}
1616

1717
var server = net.createServer(function(s) {
18+
if (common.isWindows) {
19+
s.on('error', function(err) {
20+
// Prevent possible ECONNRESET errors from popping up
21+
if (err.code !== 'ECONNRESET')
22+
throw err;
23+
});
24+
}
1825
setTimeout(function() {
1926
s.destroy();
2027
}, 100);

0 commit comments

Comments
 (0)