try sleep 3 for fixing tray exit not works because of pkexec in linux
This commit is contained in:
parent
0883864d39
commit
e47d921ac6
@ -180,11 +180,14 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||
{
|
||||
#[cfg(target_os = "linux")]
|
||||
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"]));
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user