Skip to content

Commit

Permalink
fix: on stop时就不要给异常退出的日志了
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Sep 19, 2024
1 parent f5299ae commit 7850fff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7850fff

Please sign in to comment.