forked from svrjs/svrjs
Disabled killing workers, when server is closed.
This commit is contained in:
parent
68a42ccde8
commit
6515a54471
1 changed files with 50 additions and 48 deletions
2
svr.js
2
svr.js
|
@ -5198,6 +5198,7 @@ function start(init) {
|
||||||
if(cluster.isMaster !== undefined) {
|
if(cluster.isMaster !== undefined) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
|
if (!closedMaster && !exiting) {
|
||||||
var allClusters = Object.keys(cluster.workers);
|
var allClusters = Object.keys(cluster.workers);
|
||||||
var minClusters = Math.ceil(cpus / 2);
|
var minClusters = Math.ceil(cpus / 2);
|
||||||
if(minClusters < 2) minClusters = 2;
|
if(minClusters < 2) minClusters = 2;
|
||||||
|
@ -5253,6 +5254,7 @@ function start(init) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}, 120000);
|
}, 120000);
|
||||||
}, 2500);
|
}, 2500);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue