diff --git a/test/parallel/test-child-process-fork-regr-gh-2847.js b/test/parallel/test-child-process-fork-regr-gh-2847.js index d985b8b4acaf19..20d765008a208f 100644 --- a/test/parallel/test-child-process-fork-regr-gh-2847.js +++ b/test/parallel/test-child-process-fork-regr-gh-2847.js @@ -56,8 +56,8 @@ var server = net.createServer(function(s) { // Ignore errors when sending the second handle because the worker // may already have exited. if (err) { - if ((err.message !== 'channel closed') && - (err.code !== 'ECONNREFUSED')) { + if ((err.message !== 'channel closed') || + (err.code !== 'ECONNREFUSED')) { throw err; } }