diff --git a/src/core_main.rs b/src/core_main.rs index a86a3db6d..725cf92fc 100644 --- a/src/core_main.rs +++ b/src/core_main.rs @@ -172,15 +172,6 @@ pub fn core_main() -> Option> { log::info!("start --server with user {}", crate::username()); #[cfg(any(target_os = "linux", target_os = "windows"))] { - #[cfg(target_os = "linux")] - std::thread::spawn(move || { - std::thread::sleep(std::time::Duration::from_secs(3)); - if crate::platform::is_root() { - hbb_common::allow_err!(crate::platform::run_as_user(vec!["--tray"], None)); - } else { - hbb_common::allow_err!(crate::run_me(vec!["--tray"])); - } - }); crate::start_server(true); return None; } diff --git a/src/ui_interface.rs b/src/ui_interface.rs index ec2c23bd9..8e68dd812 100644 --- a/src/ui_interface.rs +++ b/src/ui_interface.rs @@ -284,7 +284,6 @@ pub fn set_option(key: String, value: String) { if value == "Y" { if crate::platform::uninstall_service(true) { std::process::exit(0); - return; } } else { if crate::platform::install_service() {