Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4ff2ac

Browse files
ehsankhfrmarco-ippolito
authored andcommitted
lib: improve cluster/primary code
PR-URL:#53756Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent993bb3b commita4ff2ac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎lib/internal/cluster/primary.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,12 @@ function emitForkNT(worker) {
221221
}
222222

223223
cluster.disconnect=function(cb){
224-
constworkers=ObjectKeys(cluster.workers);
224+
constworkers=ObjectValues(cluster.workers);
225225

226226
if(workers.length===0){
227227
process.nextTick(()=>intercom.emit('disconnect'));
228228
}else{
229-
for(constworkerofObjectValues(cluster.workers)){
229+
for(constworkerofworkers){
230230
if(worker.isConnected()){
231231
worker.disconnect();
232232
}
@@ -358,8 +358,6 @@ Worker.prototype.disconnect = function() {
358358
};
359359

360360
Worker.prototype.destroy=function(signo){
361-
constproc=this.process;
362361
constsignal=signo||'SIGTERM';
363-
364-
proc.kill(signal);
362+
this.process.kill(signal);
365363
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp