We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 993bb3b commit a4ff2acCopy full SHA for a4ff2ac
lib/internal/cluster/primary.js
@@ -221,12 +221,12 @@ function emitForkNT(worker) {
221
}
222
223
cluster.disconnect = function(cb) {
224
- const workers = ObjectKeys(cluster.workers);
+ const workers = ObjectValues(cluster.workers);
225
226
if (workers.length === 0) {
227
process.nextTick(() => intercom.emit('disconnect'));
228
} else {
229
- for (const worker of ObjectValues(cluster.workers)) {
+ for (const worker of workers) {
230
if (worker.isConnected()) {
231
worker.disconnect();
232
@@ -358,8 +358,6 @@ Worker.prototype.disconnect = function() {
358
};
359
360
Worker.prototype.destroy = function(signo) {
361
- const proc = this.process;
362
const signal = signo || 'SIGTERM';
363
-
364
- proc.kill(signal);
+ this.process.kill(signal);
365
0 commit comments