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

@@ -1,6 +1,9 @@
use super::CmdResult;
use crate::{
core::service::{self, SERVICE_MANAGER, ServiceStatus},
core::{
CoreManager,
service::{self, SERVICE_MANAGER, ServiceStatus},
},
utils::i18n::t,
};
@@ -14,6 +17,10 @@ async fn execute_service_operation_sync(status: ServiceStatus, op_type: &str) ->
let emsg = format!("{} Service failed: {}", op_type, e);
return Err(t(emsg.as_str()).await);
}
if CoreManager::global().restart_core().await.is_err() {
let emsg = "Restart Core failed";
return Err(t(emsg).await);
}
Ok(())
}