mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
opt: add join handler to prevent server stopped
This commit is contained in:
@@ -158,10 +158,12 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
std::thread::spawn(move || crate::start_server(true));
|
||||
// to-do: for flutter, starting tray not ready yet, or we can reuse sciter's tray implementation.
|
||||
}
|
||||
#[cfg(all(target_os = "linux", feature = "flutter"))]
|
||||
#[cfg(all(target_os = "linux"))]
|
||||
{
|
||||
std::thread::spawn(move || crate::start_server(true));
|
||||
let handler = std::thread::spawn(move || crate::start_server(true));
|
||||
crate::tray::start_tray(crate::ui_interface::OPTIONS.clone());
|
||||
// revent server exit when encountering errors from tray
|
||||
handler.join();
|
||||
}
|
||||
} else if args[0] == "--import-config" {
|
||||
if args.len() == 2 {
|
||||
|
||||
Reference in New Issue
Block a user