pub fn ensure_daemon(scan: PortScan) -> Result<DaemonInfo>Expand description
Ensure a daemon is running and return its info. If a daemon is found (via discovery file or port scan), we MAY take it over if the client is newer. Otherwise we spawn a fresh daemon on the first free port in the scan range.
§Errors
Returns an error if no free port is available, the daemon cannot be spawned, or it does not become ready within the timeout period.