exit directly in rustdesk_core_main for macos

This commit is contained in:
rustdesk
2023-06-28 12:05:27 +08:00
parent c66e8312de
commit 9fa9128892
2 changed files with 7 additions and 7 deletions

View File

@@ -67,8 +67,12 @@ lazy_static::lazy_static! {
#[no_mangle]
pub extern "C" fn rustdesk_core_main() -> bool {
#[cfg(not(any(target_os = "android", target_os = "ios")))]
return crate::core_main::core_main().is_some();
#[cfg(any(target_os = "android", target_os = "ios"))]
if crate::core_main::core_main().is_some() {
return true;
} else {
#[cfg(target_os = "macos")]
std::process::exit(0);
}
false
}