Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix --server not killed when stop service on mac

rustdesk0e6d36897048
diff --git a/src/platform/macos.rs b/src/platform/macos.rs
index 02fc828a6..6c5f19b9a 100644
--- a/src/platform/macos.rs
+++ b/src/platform/macos.rs
@@ -248,6 +248,10 @@ pub fn uninstall_service(show_new_window: bool) -> bool {
.args(&["remove", &format!("{}_server", crate::get_full_name())])
.status()
.ok();
+ std::process::Command::new("pkill")
+ .arg(crate::get_app_name())
+ .status()
+ .ok();
if show_new_window {
std::process::Command::new("sh")
.arg("-c")
@@ -257,11 +261,6 @@ pub fn uninstall_service(show_new_window: bool) -> bool {
))
.spawn()
.ok();
- } else {
- std::process::Command::new("pkill")
- .arg(crate::get_app_name())
- .status()
- .ok();
}
quit_gui();
}