fix: persist auth cookies on close in native mode (#650)

(cherry picked from commit b7e7a2548e)
This commit is contained in:
Chris Tate
2026-03-09 09:38:10 +09:00
committed by leeguooooo
parent bb92e08fdc
commit 3cbc284076
3 changed files with 136 additions and 3 deletions
+6 -3
View File
@@ -507,9 +507,12 @@ impl BrowserManager {
.send_command_no_params("Browser.close", None)
.await;
// Kill Chrome process if we own it
if let Some(ref mut chrome) = self.chrome_process {
chrome.kill();
if let Some(mut chrome) = self.chrome_process.take() {
let timeout = std::time::Duration::from_secs(5);
let _ = tokio::task::spawn_blocking(move || {
chrome.wait_or_kill(timeout);
})
.await;
}
Ok(())