reset onlinestatus after test rendezvous servers

This commit is contained in:
rustdesk 2023-06-27 22:24:08 +08:00
parent 56eac7294c
commit 8709b6bc93

View File

@ -668,11 +668,13 @@ pub async fn get_nat_type(ms_timeout: u64) -> i32 {
crate::ipc::get_nat_type(ms_timeout).await
}
// #[cfg(any(target_os = "android", target_os = "ios", feature = "cli"))]
// used for client to test which server is faster in case stop-servic=Y
#[tokio::main(flavor = "current_thread")]
async fn test_rendezvous_server_() {
let servers = Config::get_rendezvous_servers();
Config::reset_online();
if servers.len() <= 1 {
return;
}
let mut futs = Vec::new();
for host in servers {
futs.push(tokio::spawn(async move {
@ -692,6 +694,7 @@ async fn test_rendezvous_server_() {
}));
}
join_all(futs).await;
Config::reset_online();
}
// #[cfg(any(target_os = "android", target_os = "ios", feature = "cli"))]