From 849ac8aad0096c8d62cc3fadc8b19952e08ffccf Mon Sep 17 00:00:00 2001 From: trrk Date: Sun, 7 Aug 2022 14:57:40 +0900 Subject: [PATCH] Fix wrong kind of timeout set to isahc Connection timeouts should be set --- src/isahc.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/isahc.rs b/src/isahc.rs index 92b0f1a..a40ea6e 100644 --- a/src/isahc.rs +++ b/src/isahc.rs @@ -87,7 +87,7 @@ impl HttpClient for IsahcClient { builder = builder.tcp_nodelay(); } if let Some(timeout) = config.timeout { - builder = builder.timeout(timeout); + builder = builder.connect_timeout(timeout); } self.client = builder.build()?; @@ -115,7 +115,7 @@ impl TryFrom for IsahcClient { builder = builder.tcp_nodelay(); } if let Some(timeout) = config.timeout { - builder = builder.timeout(timeout); + builder = builder.connect_timeout(timeout); } Ok(Self {