test: fix child-process-fork-regr-gh-2847 again
Windows is still sometimes failing with ECONNRESET. Bring back the handling of this error as was initially introduced in PR #4442. PR-URL: https://github.com/nodejs/node/pull/5179 Reviewed-By: Rich Trott <rtrott@gmail.com> Fixes: https://github.com/nodejs/node/issues/3635
This commit is contained in:
parent
b55e58042c
commit
24667eeff8
@ -15,6 +15,13 @@ if (!cluster.isMaster) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var server = net.createServer(function(s) {
|
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() {
|
setTimeout(function() {
|
||||||
s.destroy();
|
s.destroy();
|
||||||
}, 100);
|
}, 100);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user