diff --git a/hfd-cli/Cargo.toml b/hfd-cli/Cargo.toml index 879e276..537b8fe 100644 --- a/hfd-cli/Cargo.toml +++ b/hfd-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hfd-cli" -version = "0.2.6" +version = "0.2.7" edition = "2021" [dependencies] diff --git a/hfd-cli/src/lib.rs b/hfd-cli/src/lib.rs index ec33327..b7011bc 100644 --- a/hfd-cli/src/lib.rs +++ b/hfd-cli/src/lib.rs @@ -88,7 +88,7 @@ async fn download_chunk( ) -> Result<(), Box> { let client= reqwest::Client::builder() .default_headers(headers.clone()) - .pool_idle_timeout(Duration::from_secs(1)) + .pool_max_idle_per_host(0) .build()?; let range = format!("bytes={s}-{e}"); @@ -116,7 +116,7 @@ async fn download( let client = reqwest::Client::builder() .default_headers(headers.clone()) - .pool_idle_timeout(Duration::from_secs(1)) + .pool_max_idle_per_host(0) .build()?; let response = client.get(&url).header(RANGE, "bytes=0-0").send().await?; @@ -188,7 +188,7 @@ impl HfClient { async fn list_files(&self) -> Result, Box> { let client = reqwest::Client::builder() - .pool_idle_timeout(Duration::from_secs(1)) + .pool_max_idle_per_host(0) .build()?; let api = self.hf_url.api(); let response = client.get(api)