Skip to main content

download_retrying

Function download_retrying 

Source
pub fn download_retrying(
    api: &Api,
    package: &PackageInfo,
    cache: &mut Cache,
    progress: &'_ mut dyn FnMut(u64, Option<u64>),
    cancel: &AtomicBool,
    on_retry: &mut dyn FnMut(&HttpError, u64),
) -> Result<(), HttpError>
Expand description

download_to_cache, tried again after a failure a retry could fix (see HttpError::is_transient, plus a payload that arrived corrupted), waiting between attempts; on_retry hears why, for the run log.