Skip to main content

is_daemon_unreachable_err

Function is_daemon_unreachable_err 

Source
pub fn is_daemon_unreachable_err(err: &IpcError) -> bool
Expand description

Is this connect-time error a “daemon process is gone entirely” error?

The conservative set: NotFound (Unix socket missing, Windows pipe missing), ConnectionRefused (Unix socket exists but no listener; Windows backoff helper synthesizes this when all pipe instances are permanently busy), and BrokenPipe (race: pipe vanished between open and use). Other errors (TimedOut, protocol mismatches, etc.) are NOT daemon-gone — they should still fail loudly.

Used by session_end_idempotent (issue #159) and the CLI’s cmd_session_end (issue #150 / #151) to map “the daemon already died” connect-time failures onto a success no-op. Other request types keep their existing strict error semantics.