From 46efd058105905dbac4fac83d76a3980df56881c Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Mon, 14 Dec 2020 13:42:35 -0800 Subject: [PATCH] Change default tcp_keepalive value to be disabled (#1113) --- src/async_impl/client.rs | 6 +++--- src/blocking/client.rs | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/async_impl/client.rs b/src/async_impl/client.rs index 523053332..0b842f0e8 100644 --- a/src/async_impl/client.rs +++ b/src/async_impl/client.rs @@ -136,7 +136,9 @@ impl ClientBuilder { connection_verbose: false, pool_idle_timeout: Some(Duration::from_secs(90)), pool_max_idle_per_host: std::usize::MAX, - tcp_keepalive: Some(Duration::from_secs(60)), + // TODO: Re-enable default duration once hyper's HttpConnector is fixed + // to no longer error when an option fails. + tcp_keepalive: None, //Some(Duration::from_secs(60)), proxies: Vec::new(), auto_sys_proxy: true, redirect_policy: redirect::Policy::default(), @@ -730,8 +732,6 @@ impl ClientBuilder { /// Set that all sockets have `SO_KEEPALIVE` set with the supplied duration. /// /// If `None`, the option will not be set. - /// - /// Default is 60 seconds. pub fn tcp_keepalive(mut self, val: D) -> ClientBuilder where D: Into>, diff --git a/src/blocking/client.rs b/src/blocking/client.rs index d1fbe4159..66c74dcaa 100644 --- a/src/blocking/client.rs +++ b/src/blocking/client.rs @@ -412,8 +412,6 @@ impl ClientBuilder { /// Set that all sockets have `SO_KEEPALIVE` set with the supplied duration. /// /// If `None`, the option will not be set. - /// - /// Default is 60 seconds. pub fn tcp_keepalive(self, val: D) -> ClientBuilder where D: Into>,