From 5f074d869cda9e9824aba85aa7d06bd6a87fd7f1 Mon Sep 17 00:00:00 2001 From: Leonardo Yvens Date: Mon, 8 Aug 2022 15:44:55 +0100 Subject: [PATCH] firehose: Set tcp keepalive --- graph/src/firehose/endpoints.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graph/src/firehose/endpoints.rs b/graph/src/firehose/endpoints.rs index adabb54268c..807834cf5a8 100644 --- a/graph/src/firehose/endpoints.rs +++ b/graph/src/firehose/endpoints.rs @@ -70,7 +70,8 @@ impl FirehoseEndpoint { // send pings. let endpoint = endpoint_builder .initial_connection_window_size(Some((1 << 31) - 1)) - .connect_timeout(Duration::from_secs(10)); + .connect_timeout(Duration::from_secs(10)) + .tcp_keepalive(Some(Duration::from_secs(15))); let uri = endpoint.uri().to_string(); //connect_lazy() used to return Result, but not anymore, that makes sence since Channel is not used immediatelly