Skip to content

Commit

Permalink
rm messages stuff, disconnect directly?
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed Dec 27, 2015
1 parent ae226af commit 53a63cc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions test/parallel/test-cluster-shared-leak.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (cluster.isMaster) {
worker1.on('message', common.mustCall(function() {
worker2 = cluster.fork();
conn = net.connect(common.PORT, common.mustCall(function() {
worker1.send('die');
worker1.disconnect();
worker2.disconnect();
}));
conn.on('error', function(e) {
Expand Down Expand Up @@ -44,10 +44,3 @@ var server = net.createServer(function(c) {
server.listen(common.PORT, function() {
process.send('listening');
});

process.on('message', function(msg) {
if (msg !== 'die') return;
server.close(function() {
setImmediate(() => process.disconnect());
});
});

0 comments on commit 53a63cc

Please sign in to comment.