Skip to content

Commit

Permalink
drop the timeout time even lower
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Oct 6, 2023
1 parent 8efd3b8 commit 3ee62c1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions xmtp_networking/src/grpc_api_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn get_tls_connector() -> HttpsConnector<tower::timeout::Timeout<HttpConnector>>
.enable_http2()
.wrap_connector(s)
})
.timeout(Duration::from_secs(5))
.timeout(Duration::from_secs(2))
.service(http)
}

Expand Down Expand Up @@ -74,9 +74,9 @@ impl Client {
let connector = get_tls_connector();

let tls_conn = hyper::Client::builder()
.pool_idle_timeout(Duration::from_secs(30))
.http2_keep_alive_interval(Duration::from_secs(10))
.http2_keep_alive_timeout(Duration::from_secs(5))
.pool_idle_timeout(Duration::from_secs(5))
.http2_keep_alive_interval(Duration::from_secs(3))
.http2_keep_alive_timeout(Duration::from_secs(2))
.build(connector);

let uri =
Expand All @@ -91,11 +91,11 @@ impl Client {
} else {
let channel = Channel::from_shared(host)
.map_err(|e| Error::new(ErrorKind::SetupError).with(e))?
.timeout(Duration::from_secs(5))
.connect_timeout(Duration::from_secs(5))
.tcp_keepalive(Some(Duration::from_secs(10)))
.http2_keep_alive_interval(Duration::from_secs(10))
.keep_alive_timeout(Duration::from_secs(5))
.timeout(Duration::from_secs(2))
.connect_timeout(Duration::from_secs(2))
.tcp_keepalive(Some(Duration::from_secs(5)))
.http2_keep_alive_interval(Duration::from_secs(5))
.keep_alive_timeout(Duration::from_secs(2))
.connect()
.await
.map_err(|e| Error::new(ErrorKind::SetupError).with(e))?;
Expand Down

0 comments on commit 3ee62c1

Please sign in to comment.