Browse Source

app: use `app.on('before-quit')` to detect app closing

Jeffrey Morgan 1 year ago
parent
commit
52ea4d4bb2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/src/index.ts

+ 1 - 1
app/src/index.ts

@@ -107,7 +107,7 @@ function server() {
     server()
   })
 
-  process.on('exit', () => {
+  app.on('before-quit', () => {
     proc.off('exit', restart)
     proc.kill()
   })