fix: detect stale unix socket by attempting connection (#114)

This commit is contained in:
Li Yang
2026-01-17 19:42:48 -06:00
committed by GitHub
parent 42879c337a
commit 5e08e5d077
+2 -1
View File
@@ -140,7 +140,8 @@ fn is_daemon_running(session: &str) -> bool {
fn daemon_ready(session: &str) -> bool { fn daemon_ready(session: &str) -> bool {
#[cfg(unix)] #[cfg(unix)]
{ {
get_socket_path(session).exists() let socket_path = get_socket_path(session);
UnixStream::connect(&socket_path).is_ok()
} }
#[cfg(windows)] #[cfg(windows)]
{ {