From a34a1886def2a9d7dfe8f26d85996cd2eb1bf753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= <8473136@qq.com> Date: Wed, 8 Jan 2025 13:39:43 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixing=20the=20issue=20where=20f?= =?UTF-8?q?rpc=20still=20runs=20after=20exiting=20with=20command=20+=20q.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main/index.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index 7a70f18..b9c7a2b 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -178,7 +178,13 @@ app.whenReady().then(() => { logInfo( LogModule.APP, `Config retrieved: ${JSON.stringify( - maskSensitiveData(config, ["serverAddr", "serverPort", "authToken", "user", "metaToken"]) + maskSensitiveData(config, [ + "serverAddr", + "serverPort", + "authToken", + "user", + "metaToken" + ]) )}` ); @@ -270,7 +276,9 @@ app.on("activate", () => { app.on("before-quit", () => { logInfo(LogModule.APP, `Application is about to quit.`); - isQuiting = true; + stopFrpcProcess(() => { + isQuiting = true; + }); }); ipcMain.handle("open-win", (_, arg) => {