mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 18:51:13 +08:00
feat: 客户端与探活三函数按 endpoint 形态分支 Unix 与 TCP 两臂
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user