mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-19 17:51:28 +03:00
elevation prompt && uac warning
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -229,6 +229,8 @@ impl Connection {
|
||||
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
std::thread::spawn(move || Self::handle_input(rx_input, tx_cloned));
|
||||
let mut second_timer = time::interval(Duration::from_secs(1));
|
||||
let mut uac = false;
|
||||
|
||||
loop {
|
||||
tokio::select! {
|
||||
@@ -400,6 +402,19 @@ impl Connection {
|
||||
break;
|
||||
}
|
||||
},
|
||||
_ = second_timer.tick() => {
|
||||
let is_uac = crate::video_service::IS_UAC_RUNNING.lock().unwrap().clone();
|
||||
if uac != is_uac {
|
||||
if !crate::platform::is_installed() && !crate::platform::is_root() {
|
||||
uac = is_uac;
|
||||
let mut misc = Misc::new();
|
||||
misc.set_uac(uac);
|
||||
let mut msg = Message::new();
|
||||
msg.set_misc(misc);
|
||||
conn.inner.send(msg.into());
|
||||
}
|
||||
}
|
||||
}
|
||||
_ = test_delay_timer.tick() => {
|
||||
if last_recv_time.elapsed() >= SEC30 {
|
||||
conn.on_close("Timeout", true).await;
|
||||
|
||||
Reference in New Issue
Block a user