Skip to content

Commit ecff686

Browse files
santigimenostefanmb
authored andcommitted
test: fix child-process-fork-regr-nodejsgh-2847 again
Windows is still sometimes failing with ECONNRESET. Bring back the handling of this error as was initially introduced in PR nodejs#4442. PR-URL: nodejs#5179 Reviewed-By: Rich Trott <[email protected]> Fixes: nodejs#3635
1 parent 3be258c commit ecff686

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

Lines changed: 7 additions & 0 deletions
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)