VBMXB443FGZL6DLT6KAP2ICFCCQNXCUMDEUL67HB4CNKFMBBNSSAC
};
while let Some(chunk) = res.chunk().await? {
debug!("writing {:?}", chunk.len());
f.write_all(&chunk)?;
loop {
match res.chunk().await {
Ok(Some(chunk)) => {
debug!("writing {:?}", chunk.len());
f.write_all(&chunk)?;
}
Ok(None) => break 'outer,
Err(_) => {
error!("Error while downloading {:?}, retrying", url);
tokio::time::delay_for(std::time::Duration::from_secs_f64(delay)).await;
delay *= 2.;
break;
}
}
}
std::fs::rename(&path_, &path_.with_extension("change"))?;