mirror of
https://github.com/alterware/alterware-launcher.git
synced 2026-12-05 12:28:39 +00:00
add retry with increased timeout if all failed
This commit is contained in:
1 parent
603ce882ae
commit
3a978ac39d
1 file changed
+6
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user