Skip to content

Commit

Permalink
v0.2.7 use none-keep alive
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed May 13, 2024
1 parent b9c6d01 commit d34b3a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hfd-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "hfd-cli"
version = "0.2.6"
version = "0.2.7"
edition = "2021"

[dependencies]
Expand Down
6 changes: 3 additions & 3 deletions hfd-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async fn download_chunk(
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
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}");
Expand Down Expand Up @@ -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?;
Expand Down Expand Up @@ -188,7 +188,7 @@ impl HfClient {

async fn list_files(&self) -> Result<Vec<String>, Box<dyn std::error::Error>> {
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)
Expand Down

0 comments on commit d34b3a8

Please sign in to comment.