Skip to content

Commit

Permalink
fix(registry): make sure to process a download after it has completed
Browse files Browse the repository at this point in the history
  • Loading branch information
x-hgg-x committed Oct 12, 2024
1 parent e8adba9 commit 7c34167
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cargo/sources/registry/http_remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -796,16 +796,16 @@ impl<'gctx> RegistryData for HttpRegistry<'gctx> {
self.downloads.blocking_calls += 1;

loop {
self.handle_completed_downloads()?;
self.add_sleepers()?;

let remaining_in_multi = tls::set(&self.downloads, || {
self.multi
.perform()
.context("failed to perform http requests")
})?;
trace!(target: "network", "{} transfers remaining", remaining_in_multi);

self.handle_completed_downloads()?;
self.add_sleepers()?;

if remaining_in_multi + self.downloads.sleeping.len() as u32 == 0 {
return Ok(());
}
Expand Down

0 comments on commit 7c34167

Please sign in to comment.