From 34d38008499de37d9b5b65440b3123ccd05c7510 Mon Sep 17 00:00:00 2001 From: gngpp Date: Fri, 20 Oct 2023 19:07:43 +0800 Subject: [PATCH] fix(client): panic when pool idle timeout set to zero (#3365) From issue: https://github.com/hyperium/hyper/issues/2997 --- src/client/pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/pool.rs b/src/client/pool.rs index b9772d688d..91b7fcb21f 100644 --- a/src/client/pool.rs +++ b/src/client/pool.rs @@ -113,7 +113,7 @@ impl Pool { waiters: HashMap::new(), #[cfg(feature = "runtime")] exec: __exec.clone(), - timeout: config.idle_timeout, + timeout: config.idle_timeout.filter(|&t| t > Duration::ZERO), }))) } else { None