Change default tcp_keepalive value to be disabled (#1113)

This commit is contained in:
Sean McArthur
2020-12-14 13:42:35 -08:00
committed by GitHub
parent 3ca0bd98e8
commit 46efd05810
2 changed files with 3 additions and 5 deletions

View File

@@ -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<D>(mut self, val: D) -> ClientBuilder
where
D: Into<Option<Duration>>,

View File

@@ -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<D>(self, val: D) -> ClientBuilder
where
D: Into<Option<Duration>>,