From f64773d88b35a2ba6e72e1673034764fc396d3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= <8473136@qq.com> Date: Tue, 6 Aug 2024 15:58:46 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=97=A0=E6=B3=95=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/api/frpc.ts | 5 ++++- electron/main/index.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/electron/api/frpc.ts b/electron/api/frpc.ts index bb89deb..e620f49 100644 --- a/electron/api/frpc.ts +++ b/electron/api/frpc.ts @@ -258,13 +258,16 @@ export const stopFrpcProcess = (callback?: () => void) => { treeKill(frpcProcess.pid, (error: Error) => { if (error) { log.error(`关闭frpc子进程失败 pid:${frpcProcess.pid} error:${error}`) + callback() } else { log.info(`关闭frpc子进程成功`) frpcProcess = null clearInterval(frpcStatusListener) + callback() } - callback() }) + } else { + callback() } } diff --git a/electron/main/index.ts b/electron/main/index.ts index 02b445d..16422b7 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -192,7 +192,7 @@ app.on("activate", () => { }); app.on('before-quit', () => { - log.info("退出") + log.info("before-quit") isQuiting = true; })