This commit is contained in:
rustdesk 2023-05-13 19:07:08 +08:00
parent c934bfbbf4
commit c1b2b55c53

View File

@ -322,7 +322,8 @@ impl Connection {
tx_desktop_ready: _tx_desktop_ready,
};
if !conn.on_open(addr).await {
conn.sleep_to_ensure_msg_recved().await;
// sleep to ensure msg got received.
sleep(1.).await;
return;
}
#[cfg(not(any(target_os = "android", target_os = "ios")))]
@ -794,11 +795,6 @@ impl Connection {
self.send(msg_out).await;
}
#[inline]
async fn sleep_to_ensure_msg_recved() {
sleep(1.).await;
}
async fn check_privacy_mode_on(&mut self) -> bool {
if video_service::get_privacy_mode_conn_id() > 0 {
self.send_login_error("Someone turns on privacy mode, exit")