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 <rtrott@gmail.com>
Fixes: #3635
  • Loading branch information
santigimeno authored and rvagg committed Feb 15, 2016
1 parent eb6d073 commit 7c88410
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 7c88410

Please sign in to comment.