Fix parallel file downloads not working
This commit is contained in:
parent
a46bc063ff
commit
3e7601db1d
@ -109,7 +109,8 @@ async fn download_multiple(args: CLIArgs, raw_urls: Vec<String>) -> Result<()> {
|
||||
}
|
||||
|
||||
async fn download_job(urls: SyncQueue, reporter: UnboundedSender<DlReport>, cli_args: CLIArgs) {
|
||||
while let Some(dlreq) = urls.lock().await.pop_front() {
|
||||
// The mutex access must be in its own scope to ensure that the lock is dropped
|
||||
while let Some(dlreq) = { urls.lock().await.pop_front() } {
|
||||
let reporter = DlReporter::new(dlreq.id as u32, reporter.clone());
|
||||
|
||||
// Resolve the zippy url to the direct download url if necessary
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user