fix: adjust something

This commit is contained in:
GyDi authored and GitHub committed 2022-04-25 20:00:11 +08:00
1 parent 9319851118
commit c2d0ccea3c
4 files changed
+11 -7

No files matched your search

+4 -2
View File
@@ -263,8 +263,10 @@ pub mod service {
#[tauri::command]
pub async fn install_service() -> Result<(), String> {
wrap_err!(crate::core::Service::install_service().await)?;
wrap_err!(crate::core::Service::start_service().await)
log_if_err!(crate::core::Service::install_service().await);
let ret = wrap_err!(crate::core::Service::start_service().await);
log::info!("clash verge service started successfully");
ret
}
#[tauri::command]
+1 -2
View File
@@ -85,8 +85,7 @@ fn main() -> std::io::Result<()> {
}
"quit" => {
resolve::resolve_reset(app_handle);
api::process::kill_children();
std::process::exit(0);
app_handle.exit(0);
}
_ => {}
},
+4 -1
View File
@@ -22,8 +22,11 @@ pub fn resolve_setup(app: &App) {
pub fn resolve_reset(app_handle: &AppHandle) {
let core = app_handle.state::<Core>();
let mut sysopt = core.sysopt.lock();
sysopt.reset_sysproxy();
drop(sysopt);
let mut service = core.service.lock();
crate::log_if_err!(service.stop());
}
/// customize the window theme