浏览代码

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

Jeffrey Morgan 1 年之前
父节点
当前提交
52ea4d4bb2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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()
   })