mirror of
https://github.com/Tencent/BrowserSkill.git
synced 2026-09-10 13:01:23 +08:00
fix(daemon): refresh stale idle-task comment
After folding the IPC connection count and activity timestamp into a single mutex-protected IpcActivityState, the idle task no longer references the connection count directly; should_exit_for_idle already returns false while a connection is open or within the idle window. Update the comment to describe the post-refactor control flow so it matches the code.
This commit is contained in:
@@ -350,11 +350,13 @@ pub fn run_foreground(cfg: DaemonConfig) -> Result<()> {
|
|||||||
if !ipc_is_idle {
|
if !ipc_is_idle {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Bridge from M2/M3 (which only knew about connection
|
// IPC liveness (open-connection count + idle window) is already
|
||||||
// counts) to M4/M5 (browser + session registries):
|
// enforced above by `should_exit_for_idle`, which reads
|
||||||
// hold the daemon alive while any IPC client is
|
// `IpcActivityState` under one lock and returns true only when
|
||||||
// connected, any browser is paired, or any session
|
// there are zero connections AND the idle interval has elapsed.
|
||||||
// is live (design §3.2).
|
// Here we additionally hold the daemon alive while any browser
|
||||||
|
// is paired or any session is live (design §3.2, M4/M5
|
||||||
|
// registries).
|
||||||
if !state.browsers.is_empty() || !state.sessions.is_empty() {
|
if !state.browsers.is_empty() || !state.sessions.is_empty() {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user