Revert "fix: improve Service connection method and permissions for Windows and Unix"

This reverts commit 601e99f0b5.

Revert "refactor: clash-verge-rev-service-ipc (#4841)"

This reverts commit 5370bd45ed.
This commit is contained in:
Tunglies
2025-10-11 21:21:01 +08:00
parent 121b8c433b
commit 4f1d61a56e
16 changed files with 772 additions and 540 deletions

View File

@@ -870,6 +870,7 @@ impl CoreManager {
}
pub async fn prestart_core(&self) -> Result<()> {
SERVICE_MANAGER.lock().await.refresh().await?;
match SERVICE_MANAGER.lock().await.current() {
ServiceStatus::Ready => {
self.set_running_mode(RunningMode::Service);
@@ -911,9 +912,6 @@ impl CoreManager {
pub async fn restart_core(&self) -> Result<()> {
logging!(info, Type::Core, "Restarting core");
self.stop_core().await?;
if SERVICE_MANAGER.lock().await.init().await.is_ok() {
logging_error!(Type::Setup, SERVICE_MANAGER.lock().await.refresh().await);
}
self.start_core().await?;
Ok(())
}