fix: don't kill worker if it exited normally

This commit is contained in:
cha0s 2024-02-12 06:27:50 -06:00
parent 4d55e5524c
commit 38cf6725c2

View File

@ -96,7 +96,7 @@ class StartServerPlugin {
});
this.worker = cluster.fork(env);
this.worker.on('exit', (code) => {
if (killOnExit) {
if (killOnExit && !this.worker.exitedAfterDisconnect) {
process.send({type: 'kill', payload: code});
process.exit(code);
}