From: Chris Duncan Date: Mon, 16 Jun 2025 19:49:20 +0000 (-0700) Subject: Move server exit out of execution and into process management. X-Git-Tag: v5.0.0~10 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=09cc3dc4b604812680d737afbe95b3b8f5075487;p=nano-pow.git Move server exit out of execution and into process management. --- diff --git a/src/bin/cli.ts b/src/bin/cli.ts index 65fcc0e..09c0985 100755 --- a/src/bin/cli.ts +++ b/src/bin/cli.ts @@ -172,6 +172,8 @@ server.on('message', async (msg: Serializable): Promise => { await execute() } catch { logger.log(`Error executing ${body.action}`) + } finally { + server.kill() } } else { logger.log('CLI server failed to connect over IPC') @@ -229,5 +231,4 @@ async function execute (): Promise { } if (isBatch && !isBenchmark) console.log(results) if (process.env.NANO_POW_DEBUG || isBenchmark) console.log(stats(times)) - server.kill() }