mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Enforce HTTP timeouts on a per-read (rather than per-request) basis (#3144)
## Summary This leverages the new `read_timeout` property, which ensures that (like pip) our timeout is not applied to the _entire_ request, but rather, to each individual read operation. Closes: #1921. See: #1912.
This commit is contained in:
parent
31765c05bd
commit
9f2bc19eaf
2 changed files with 5 additions and 5 deletions
|
@ -125,7 +125,7 @@ impl<'a> BaseClientBuilder<'a> {
|
|||
})
|
||||
})
|
||||
.unwrap_or(default_timeout);
|
||||
debug!("Using registry request timeout of {}s", timeout);
|
||||
debug!("Using registry request timeout of {timeout}s");
|
||||
|
||||
// Initialize the base client.
|
||||
let client = self.client.clone().unwrap_or_else(|| {
|
||||
|
@ -145,7 +145,7 @@ impl<'a> BaseClientBuilder<'a> {
|
|||
let client_core = ClientBuilder::new()
|
||||
.user_agent(user_agent_string)
|
||||
.pool_max_idle_per_host(20)
|
||||
.timeout(std::time::Duration::from_secs(timeout))
|
||||
.read_timeout(std::time::Duration::from_secs(timeout))
|
||||
.tls_built_in_root_certs(false);
|
||||
|
||||
// Configure TLS.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue