Skip to content

Commit 46efd05

Browse files
authored
Change default tcp_keepalive value to be disabled (#1113)
1 parent 3ca0bd9 commit 46efd05

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/async_impl/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ impl ClientBuilder {
136136
connection_verbose: false,
137137
pool_idle_timeout: Some(Duration::from_secs(90)),
138138
pool_max_idle_per_host: std::usize::MAX,
139-
tcp_keepalive: Some(Duration::from_secs(60)),
139+
// TODO: Re-enable default duration once hyper's HttpConnector is fixed
140+
// to no longer error when an option fails.
141+
tcp_keepalive: None, //Some(Duration::from_secs(60)),
140142
proxies: Vec::new(),
141143
auto_sys_proxy: true,
142144
redirect_policy: redirect::Policy::default(),
@@ -730,8 +732,6 @@ impl ClientBuilder {
730732
/// Set that all sockets have `SO_KEEPALIVE` set with the supplied duration.
731733
///
732734
/// If `None`, the option will not be set.
733-
///
734-
/// Default is 60 seconds.
735735
pub fn tcp_keepalive<D>(mut self, val: D) -> ClientBuilder
736736
where
737737
D: Into<Option<Duration>>,

src/blocking/client.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,6 @@ impl ClientBuilder {
412412
/// Set that all sockets have `SO_KEEPALIVE` set with the supplied duration.
413413
///
414414
/// If `None`, the option will not be set.
415-
///
416-
/// Default is 60 seconds.
417415
pub fn tcp_keepalive<D>(self, val: D) -> ClientBuilder
418416
where
419417
D: Into<Option<Duration>>,

0 commit comments

Comments
 (0)