feat: 客户端与探活三函数按 endpoint 形态分支 Unix 与 TCP 两臂

This commit is contained in:
2026-10-11 13:07:29 +00:00
parent d6fa71759b
commit 9d2790e036
9 changed files with 149 additions and 78 deletions
+3 -1
View File
@@ -21,6 +21,8 @@
use std::path::Path;
use std::time::{Duration, Instant};
use oxide_net::Endpoint;
use super::cleanup::{self, Decision};
use super::sidecar;
@@ -92,7 +94,7 @@ pub fn liveness_scan_with_waits(
// PID 存活与刻度匹配(PID 死时匹配位恒假)。
let identity = sidecar::read_identity(sidecar_path);
let socket_exists = socket_path.exists();
let socket_alive = socket_exists && sidecar::is_server_alive(socket_path);
let socket_alive = socket_exists && sidecar::is_server_alive(&Endpoint::Unix(socket_path.to_path_buf()));
let (pid_alive, starttime_match) = match &identity {
Some(id) => {
let alive = sidecar::pid_alive(id.pid);