Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wait up to one second while waiting for curl #10456

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Wait up to one second while waiting for curl
Signed-off-by: hi-rustin <[email protected]>
Rustin170506 committed Mar 4, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit b68bf778409a8ec8a6d0f5361832e72586edfbc3
8 changes: 3 additions & 5 deletions src/cargo/core/package.rs
Original file line number Diff line number Diff line change
@@ -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)