exit directly if no --server for --tray

This commit is contained in:
rustdesk 2023-06-10 22:26:30 +08:00
parent f22aa0c97e
commit 9677bd1863

View File

@ -96,6 +96,10 @@ pub fn make_tray() -> hbb_common::ResultType<()> {
if let Ok(event) = menu_channel.try_recv() { if let Ok(event) = menu_channel.try_recv() {
if event.id == quit_i.id() { if event.id == quit_i.id() {
if !crate::check_process("--server", false) {
*control_flow = ControlFlow::Exit;
return;
}
crate::platform::uninstall_service(false); crate::platform::uninstall_service(false);
} else if event.id == open_i.id() { } else if event.id == open_i.id() {
open_func(); open_func();