mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
Revert "fix: improve Service connection method and permissions for Windows and Unix"
This reverts commit601e99f0b5. Revert "refactor: clash-verge-rev-service-ipc (#4841)" This reverts commit5370bd45ed.
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user