mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-12-06 06:30:03 +08:00
fix(core): improve service startup and cleanup reliability
Wait longer for slow Windows service startup, then hand off from sidecar to service when it becomes ready. Retry service core startup during the handoff window, and clean up root-owned macOS service core/IPC leftovers before uninstalling the service.
This commit is contained in:
@@ -42,6 +42,9 @@ pub struct CoreManager {
|
||||
state: ArcSwap<State>,
|
||||
last_update: ArcSwapOption<Instant>,
|
||||
config_update_in_progress: AtomicBool,
|
||||
// sidecar→service 交接 watcher 单实例标志。
|
||||
#[cfg(target_os = "windows")]
|
||||
handoff_watcher_running: AtomicBool,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -65,6 +68,8 @@ impl Default for CoreManager {
|
||||
state: ArcSwap::new(Arc::new(State::default())),
|
||||
last_update: ArcSwapOption::new(None),
|
||||
config_update_in_progress: AtomicBool::new(false),
|
||||
#[cfg(target_os = "windows")]
|
||||
handoff_watcher_running: AtomicBool::new(false),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user