Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default tcp_keepalive value to be disabled #1113

Merged
merged 1 commit into from Dec 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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