diff --git a/src/download.rs b/src/download.rs index 9f0182f..4197a78 100644 --- a/src/download.rs +++ b/src/download.rs @@ -270,6 +270,9 @@ pub async fn download_feedback_multi(url: &str, into_file: &str, rep: DlReporter let specific_content_length = from_to.1 - from_to.0 + 1; + // Delay each chunk-download to reduce the number of simultanious connection attempts + tokio::time::sleep(tokio::time::Duration::from_millis(50 *index as u64)).await; + download_feedback_chunks(&url, &into_file, rep, Some(from_to), true, Some(specific_content_length)).await.map_err(|e| e.to_string()) }))