feat: improve mihomo core and service keep-alive and reinstallation logic

This commit is contained in:
wonfen
2025-03-25 06:41:00 +08:00
parent 31a7750482
commit e054ac67fb
2 changed files with 109 additions and 18 deletions

View File

@@ -216,6 +216,12 @@ pub async fn reinstall_service() -> Result<()> {
);
}
// 记录安装信息并保存
let mut service_state = ServiceState::get();
service_state.record_install();
service_state.last_error = None;
service_state.save()?;
Ok(())
}
@@ -268,6 +274,13 @@ pub async fn reinstall_service() -> Result<()> {
status.code().unwrap()
);
}
// 记录安装信息并保存
let mut service_state = ServiceState::get();
service_state.record_install();
service_state.last_error = None;
service_state.save()?;
Ok(())
}