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