From 717b052a88df7c4ef05c3f9629843c796d4bfa1f Mon Sep 17 00:00:00 2001 From: kjuulh Date: Sat, 30 Nov 2024 12:30:16 +0100 Subject: [PATCH] feat: add short connect timeout Signed-off-by: kjuulh --- crates/churn/src/agent/grpc_client.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/churn/src/agent/grpc_client.rs b/crates/churn/src/agent/grpc_client.rs index be9639a..48f65dd 100644 --- a/crates/churn/src/agent/grpc_client.rs +++ b/crates/churn/src/agent/grpc_client.rs @@ -87,6 +87,7 @@ impl GrpcClient { let channel = if self.host.starts_with("https") { Channel::from_shared(self.host.to_owned())? .tls_config(ClientTlsConfig::new().with_native_roots())? + .connect_timeout(std::time::Duration::from_secs(5)) .connect() .await? } else {