diff --git a/src/cdn.rs b/src/cdn.rs index 85de482..59ea5b1 100644 --- a/src/cdn.rs +++ b/src/cdn.rs @@ -108,6 +108,12 @@ impl Hosts { let asn = crate::http::get_asn().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 }