mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
linux workaround --server orphan
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
b2688da10f
commit
2f33e9dfac
@ -322,6 +322,8 @@ pub fn start_os_service() {
|
||||
&mut last_restart,
|
||||
&mut user_server,
|
||||
) {
|
||||
stop_rustdesk_servers();
|
||||
std::thread::sleep(std::time::Duration::from_millis(super::SERVICE_INTERVAL));
|
||||
match run_as_user("--server", Some((cur_uid, cur_user))) {
|
||||
Ok(ps) => user_server = ps,
|
||||
Err(err) => {
|
||||
@ -332,6 +334,7 @@ pub fn start_os_service() {
|
||||
}
|
||||
} else {
|
||||
stop_rustdesk_servers();
|
||||
std::thread::sleep(std::time::Duration::from_millis(super::SERVICE_INTERVAL));
|
||||
stop_server(&mut user_server);
|
||||
stop_server(&mut server);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user