mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-08 18:41:27 +03:00
fix: win, privacy mode 2 (#12123)
* fix: win, privacy mode 2 Signed-off-by: fufesou <linlong1266@gmail.com> * Update src/privacy_mode/win_virtual_display.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com> Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -219,9 +219,10 @@ async fn turn_on_privacy_async(impl_key: String, conn_id: i32) -> Option<ResultT
|
||||
let res = turn_on_privacy_sync(&impl_key, conn_id);
|
||||
let _ = tx.send(res);
|
||||
});
|
||||
// Wait at most 5 seconds for the result.
|
||||
// Wait at most 7.5 seconds for the result.
|
||||
// Because it may take a long time to turn on the privacy mode with amyuni idd.
|
||||
match hbb_common::timeout(5000, rx).await {
|
||||
// Some laptops may take time to plug in a virtual display.
|
||||
match hbb_common::timeout(7500, rx).await {
|
||||
Ok(res) => match res {
|
||||
Ok(res) => res,
|
||||
Err(e) => Some(Err(anyhow!(e.to_string()))),
|
||||
|
||||
Reference in New Issue
Block a user