From 45b02a71074f5b1bfb1f887085af92a4d9f9e5aa Mon Sep 17 00:00:00 2001 From: QLHazyCoder <2825305047@qq.com> Date: Tue, 21 Apr 2026 01:11:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0sleepWithStop?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=88=B02925=E9=82=AE=E7=AE=B1=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E7=AE=A1=E7=90=86=E5=99=A8=EF=BC=8C=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=B5=81=E7=A8=8B=E4=B8=AD=E7=9A=84=E9=87=8D?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- background.js | 1 + background/mail-2925-session.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/background.js b/background.js index 266dcf7..0cbd4c9 100644 --- a/background.js +++ b/background.js @@ -5398,6 +5398,7 @@ const mail2925SessionManager = self.MultiPageBackgroundMail2925Session?.createMa sendToMailContentScriptResilient, setPersistentSettings, setState, + sleepWithStop, throwIfStopped, upsertMail2925AccountInList, }); diff --git a/background/mail-2925-session.js b/background/mail-2925-session.js index 2677035..04f23e3 100644 --- a/background/mail-2925-session.js +++ b/background/mail-2925-session.js @@ -20,6 +20,7 @@ sendToMailContentScriptResilient, setPersistentSettings, setState, + sleepWithStop, throwIfStopped, upsertMail2925AccountInList, } = deps; @@ -366,6 +367,10 @@ await addLog(`2925:已清理 ${removedCount} 个登录相关 cookie,准备使用 ${account.email} 重新登录。`, 'info'); } + if (forceRelogin && typeof sleepWithStop === 'function') { + await sleepWithStop(3000); + } + throwIfStopped(); await reuseOrCreateTab(MAIL2925_SOURCE, forceRelogin ? MAIL2925_LOGIN_URL : MAIL2925_URL, { inject: MAIL2925_INJECT,