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,