mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-04 07:17:50 +00:00
add retry with increased timeout if all failed
This commit is contained in:
@@ -108,6 +108,12 @@ impl Hosts {
|
|||||||
|
|
||||||
let asn = crate::http::get_asn().await;
|
let asn = crate::http::get_asn().await;
|
||||||
hosts.rate(asn, true).await;
|
hosts.rate(asn, true).await;
|
||||||
|
|
||||||
|
if hosts.servers.iter().all(|server| server.rating == 0) {
|
||||||
|
info!("All CDN servers failed with 500ms timeout, retrying with 5000ms timeout");
|
||||||
|
hosts.rate(asn, false).await;
|
||||||
|
}
|
||||||
|
|
||||||
hosts
|
hosts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user