This commit is contained in:
2026-09-17 16:27:34 +02:00
parent a7cd4244b2
commit 775e3d3b8a
5 changed files with 31 additions and 32 deletions
+4 -8
View File
@@ -320,18 +320,14 @@ async fn download_file_checksum(
match download_file_checksum_once(url, checksum, algo, target_dir, progress).await {
Ok(()) => return Ok(()),
Err(e) => {
log::warn!(
"download of '{url}' failed (attempt {attempt}/{ATTEMPTS}): {e}"
);
log::warn!("download of '{url}' failed (attempt {attempt}/{ATTEMPTS}): {e}");
last_error = e;
tokio::time::sleep(std::time::Duration::from_millis(500 * u64::from(attempt))).await;
tokio::time::sleep(std::time::Duration::from_millis(500 * u64::from(attempt)))
.await;
}
}
}
Err(format!(
"downloading '{url}' failed after {ATTEMPTS} attempts: {last_error}"
)
.into())
Err(format!("downloading '{url}' failed after {ATTEMPTS} attempts: {last_error}").into())
}
/// One download attempt of [`download_file_checksum`], verifying the