Skip to content

Commit

Permalink
test: fix child-process-fork-regr-nodejsgh-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 nodejs#4442.

PR-URL: nodejs#5179
Reviewed-By: Rich Trott <[email protected]>
Fixes: nodejs#3635
  • Loading branch information
santigimeno authored and stefanmb committed Feb 23, 2016
1 parent 3be258c commit ecff686
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 ecff686

Please sign in to comment.