From 5e08e5d077e44abe33a8d788e5eb99c8d003efaf Mon Sep 17 00:00:00 2001 From: Li Yang <76434265+hewliyang@users.noreply.github.com> Date: Sun, 18 Jan 2026 09:42:48 +0800 Subject: [PATCH] fix: detect stale unix socket by attempting connection (#114) --- cli/src/connection.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/connection.rs b/cli/src/connection.rs index a77e389..9b73f0b 100644 --- a/cli/src/connection.rs +++ b/cli/src/connection.rs @@ -140,7 +140,8 @@ fn is_daemon_running(session: &str) -> bool { fn daemon_ready(session: &str) -> bool { #[cfg(unix)] { - get_socket_path(session).exists() + let socket_path = get_socket_path(session); + UnixStream::connect(&socket_path).is_ok() } #[cfg(windows)] {