Skip to content

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

fix uninstall service on mac from main window because of ipc close myself

rustdesk4b33ee63090a
diff --git a/src/platform/macos.rs b/src/platform/macos.rs
index 59f36f8c4..fa6f630ca 100644
--- a/src/platform/macos.rs
+++ b/src/platform/macos.rs
@@ -241,9 +241,6 @@ pub fn uninstall_service(show_new_window: bool) -> bool {
);
if uninstalled {
crate::ipc::set_option("stop-service", "Y");
- let _ = crate::ipc::close_all_instances();
- // leave ipc a little time
- std::thread::sleep(std::time::Duration::from_millis(300));
std::process::Command::new("launchctl")
.args(&["remove", &format!("{}_server", crate::get_full_name())])
.status()
@@ -262,6 +259,9 @@ pub fn uninstall_service(show_new_window: bool) -> bool {
.arg(crate::get_app_name())
.status()
.ok();
+ let _ = crate::ipc::close_all_instances();
+ // leave ipc a little time
+ std::thread::sleep(std::time::Duration::from_millis(300));
quit_gui();
}
}