Skip to content

Commit 8352c3c

Browse files
committed
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.
1 parent 4eedd98 commit 8352c3c

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

crates/bsk-cli/src/daemon/start.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,13 @@ pub fn run_foreground(cfg: DaemonConfig) -> Result<()> {
350350
if !ipc_is_idle {
351351
continue;
352352
}
353-
// Bridge from M2/M3 (which only knew about connection
354-
// counts) to M4/M5 (browser + session registries):
355-
// hold the daemon alive while any IPC client is
356-
// connected, any browser is paired, or any session
357-
// is live (design §3.2).
353+
// IPC liveness (open-connection count + idle window) is already
354+
// enforced above by `should_exit_for_idle`, which reads
355+
// `IpcActivityState` under one lock and returns true only when
356+
// there are zero connections AND the idle interval has elapsed.
357+
// Here we additionally hold the daemon alive while any browser
358+
// is paired or any session is live (design §3.2, M4/M5
359+
// registries).
358360
if !state.browsers.is_empty() || !state.sessions.is_empty() {
359361
continue;
360362
}

0 commit comments

Comments
 (0)