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 = [] }