mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
fix(runtime): clean up sessions on disconnect (#17)
* fix(runtime): clean up sessions on disconnect * chore(ci): match Biome 2.4 formatting * ci: retry stalled Rust job * test: bind daemon ports without probe races
This commit is contained in:
1 parent
c75f97119d
commit
1371c92721
8 files changed
+261
-24
No files matched your search
@@ -539,10 +539,9 @@ pub async fn stop_session(
|
||||
Ok(result)
|
||||
}
|
||||
Err(DispatchError::Rpc(err)) => {
|
||||
// After an extension SW restart the daemon still owns the
|
||||
// session entry (the generation-guard ensures we do not
|
||||
// purge across reconnects), but the extension's in-memory
|
||||
// SessionManager is reset and now answers `not_found`.
|
||||
// A legacy extension or an unusual reconnect race may still
|
||||
// leave a daemon session after the extension's in-memory
|
||||
// SessionManager has reset and now answers `not_found`.
|
||||
// Treat that as an authoritative signal that the session is
|
||||
// already gone and reconcile our local state instead of
|
||||
// leaving an orphan row visible to `bsk session list`
|
||||
|
||||
Reference in new issue
Block a user