Skip to content

Commit

Permalink
Change default tcp_keepalive value to be disabled (#1113)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Dec 14, 2020
1 parent 3ca0bd9 commit 46efd05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/async_impl/client.rs
Expand Up @@ -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(),
Expand Down Expand Up @@ -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>>,
Expand Down
2 changes: 0 additions & 2 deletions src/blocking/client.rs
Expand Up @@ -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>>,
Expand Down

0 comments on commit 46efd05

Please sign in to comment.