From 7850fffdba01b6832d1afa873f95e9d0a0e00da0 Mon Sep 17 00:00:00 2001 From: bangbang93 Date: Thu, 19 Sep 2024 20:04:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20on=20stop=E6=97=B6=E5=B0=B1=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E7=BB=99=E5=BC=82=E5=B8=B8=E9=80=80=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 376fdec..6471c2b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,6 +41,7 @@ function forkWorker(): void { }) function onStop(signal: string): void { + worker.removeAllListeners('exit') worker.kill(signal) worker.on('exit', () => { // eslint-disable-next-line n/no-process-exit