Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test-cluster-disconnect-with-no-workers.js « parallel « test - github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e07f5af99ddf9fe2ad924ca11fb88bbf113883a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
var assert = require('assert');
var cluster = require('cluster');

var disconnected;

process.on('exit', function() {
  assert(disconnected);
});

cluster.disconnect(function() {
  disconnected = true;
});

// Assert that callback is not sometimes synchronous
assert(!disconnected);