From 8701b2c729bfd9756a59f8632c38c97a753d4d6a Mon Sep 17 00:00:00 2001 From: Matthew Painter Date: Tue, 1 Dec 2020 15:07:26 +0000 Subject: [PATCH] Do not kill the master process - there may be graceful shutdown happening elsewhere --- src/master/implementation.node.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/master/implementation.node.ts b/src/master/implementation.node.ts index 77027c6b..c898eaaf 100644 --- a/src/master/implementation.node.ts +++ b/src/master/implementation.node.ts @@ -217,10 +217,7 @@ function initTinyWorker(): ImplementationExport { const terminateWorkersAndMaster = () => { // we should terminate all workers and then gracefully shutdown self process - Promise.all(allWorkers.map(worker => worker.terminate())).then( - () => process.exit(0), - () => process.exit(1), - ) + Promise.all(allWorkers.map(worker => worker.terminate())).catch(e => console.error(e)); allWorkers = [] }