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 <rtrott@gmail.com>
Fixes: nodejs#3635
  • Loading branch information
santigimeno authored and Trott committed Feb 10, 2016
1 parent b55e580 commit 24667ee
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 24667ee

Please sign in to comment.