diff --git a/test/parallel/test-cluster-shared-leak.js b/test/parallel/test-cluster-shared-leak.js index 9235c1ea60..ad13a869b2 100644 --- a/test/parallel/test-cluster-shared-leak.js +++ b/test/parallel/test-cluster-shared-leak.js @@ -40,6 +40,11 @@ if (cluster.isMaster) { } const server = net.createServer(function(c) { + c.on('error', function(e) { + // ECONNRESET is OK, so we don't exit with code !== 0 + if (e.code !== 'ECONNRESET') + throw e; + }); c.end('bye'); });