Skip to content

Commit

Permalink
Wait up to one second while waiting for curl
Browse files Browse the repository at this point in the history
Signed-off-by: hi-rustin <[email protected]>
  • Loading branch information
Rustin170506 committed Mar 4, 2022
1 parent 71b71cc commit b68bf77
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/cargo/core/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,11 +1000,9 @@ impl<'a, 'cfg> Downloads<'a, 'cfg> {
break Ok(pair);
}
assert!(!self.pending.is_empty());
let timeout = self
.set
.multi
.get_timeout()?
.unwrap_or_else(|| Duration::new(5, 0));
let min_timeout = Duration::new(1, 0);
let timeout = self.set.multi.get_timeout()?.unwrap_or(min_timeout);
let timeout = timeout.min(min_timeout);
self.set
.multi
.wait(&mut [], timeout)
Expand Down

0 comments on commit b68bf77

Please sign in to comment.