From 52ea4d4bb2812f7ed7611e868fa429bf29970a1c Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sun, 16 Jul 2023 19:18:04 -0700 Subject: [PATCH] app: use `app.on('before-quit')` to detect app closing --- app/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/index.ts b/app/src/index.ts index ab60ea68..6329b119 100644 --- a/app/src/index.ts +++ b/app/src/index.ts @@ -107,7 +107,7 @@ function server() { server() }) - process.on('exit', () => { + app.on('before-quit', () => { proc.off('exit', restart) proc.kill() })