smaller timeout for android and self-hosting

This commit is contained in:
rustdesk
2024-02-17 16:50:03 +08:00
parent e942c80afb
commit 964c2ed2b5
5 changed files with 16 additions and 12 deletions

View File

@@ -248,12 +248,6 @@ pub fn set_peer_option(id: String, name: String, value: String) {
c.store(&id);
}
#[inline]
pub fn using_public_server() -> bool {
option_env!("RENDEZVOUS_SERVER").unwrap_or("").is_empty()
&& crate::get_custom_rendezvous_server(get_option("custom-rendezvous-server")).is_empty()
}
#[inline]
pub fn get_options() -> String {
let options = {
@@ -1114,11 +1108,10 @@ async fn check_connect_status_(reconnect: bool, rx: mpsc::UnboundedReceiver<ipc:
allow_err!(c.send(&data).await);
}
_ = timer.tick() => {
let now = time::Instant::now();
if last_timer.elapsed() < TIMER_OUT {
continue;
}
last_timer = now;
last_timer = time::Instant::now();
c.send(&ipc::Data::OnlineStatus(None)).await.ok();
c.send(&ipc::Data::Options(None)).await.ok();