Skip to content

Commit 35f4828

Browse files
committed
test: make nodejsgh-2847 regression test stricter
Throw an error if either `err.message` or `err.code` is wrong. Previously, it was only throwing an error if one or the other was happening.
1 parent 38813c1 commit 35f4828

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-child-process-fork-regr-gh-2847.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ var server = net.createServer(function(s) {
5656
// Ignore errors when sending the second handle because the worker
5757
// may already have exited.
5858
if (err) {
59-
if ((err.message !== 'channel closed') &&
60-
(err.code !== 'ECONNREFUSED')) {
59+
if ((err.message !== 'channel closed') ||
60+
(err.code !== 'ECONNREFUSED')) {
6161
throw err;
6262
}
6363
}

0 commit comments

Comments
 (0)