Skip to content

Commit

Permalink
fix pool_max_idle_per_host error
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed May 13, 2024
1 parent 6897734 commit f4162c2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions hfd-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ async fn download(
}

while let Some(handle) = tasks.next().await {
handle.unwrap();
let res = match handle {
Ok(socket) => socket,
Err(e) => println!("{:?}", e),
};
}
Ok(())
}
Expand Down Expand Up @@ -230,8 +233,11 @@ impl HfClient {
tasks.push(download(headers, url, path, CHUNK_SIZE));
}

while let Some(task) = tasks.next().await {
task.unwrap();
while let Some(handle) = tasks.next().await {
let res = match handle {
Ok(socket) => socket,
Err(e) => println!("{:?}", e),
};
}
}
Ok(())
Expand Down

0 comments on commit f4162c2

Please sign in to comment.