Add delay between connection attempts
This commit is contained in:
parent
39af87fcb4
commit
a6e408a5e1
@ -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())
|
||||
|
||||
}))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user