Skip to content

Commit

Permalink
test: fix child-process-fork-regr-gh-2847 again
Browse files Browse the repository at this point in the history
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
  • Loading branch information
santigimeno authored and Myles Borins committed Mar 2, 2016
1 parent c4d1e3d commit 972c063
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/parallel/test-child-process-fork-regr-gh-2847.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 972c063

Please sign in to comment.