From bb61be462520e6cf163748a022f8f5afb4770b8e Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Thu, 29 Oct 2026 22:49:09 +0100 Subject: [PATCH] fix(download): bound the metadata clients like the transfers The freshness digest check and the distro checksum fetch kept the total 30 s request timeout the transfer clients just lost. They move to connect + read windows, matching the one policy. --- crates/ecrou/src/download.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/ecrou/src/download.rs b/crates/ecrou/src/download.rs index 8f68f17..659ad65 100644 --- a/crates/ecrou/src/download.rs +++ b/crates/ecrou/src/download.rs @@ -96,8 +96,10 @@ async fn fetch_oci_digest_async( repository: &str, tag: &str, ) -> anyhow::Result { + // Metadata call: a small body, so the read window alone bounds it. let client = Client::builder() - .timeout(Duration::from_secs(30)) + .connect_timeout(Duration::from_secs(30)) + .read_timeout(Duration::from_secs(30)) .build() .context("Failed to create HTTP client")?; @@ -215,8 +217,10 @@ async fn fetch_published_checksum(distro: &Distro, tarball_url: &str) -> anyhow: return Err(anyhow!("no checksum artifact for {}", tarball_url)); }; + // Metadata call: a small body, so the read window alone bounds it. let client = Client::builder() - .timeout(Duration::from_secs(30)) + .connect_timeout(Duration::from_secs(30)) + .read_timeout(Duration::from_secs(30)) .build() .context("Failed to create HTTP client")?;