feat: add short connect timeout
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-11-30 12:30:16 +01:00
parent 9b52376e7a
commit 717b052a88
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -87,6 +87,7 @@ impl GrpcClient {
let channel = if self.host.starts_with("https") { let channel = if self.host.starts_with("https") {
Channel::from_shared(self.host.to_owned())? Channel::from_shared(self.host.to_owned())?
.tls_config(ClientTlsConfig::new().with_native_roots())? .tls_config(ClientTlsConfig::new().with_native_roots())?
.connect_timeout(std::time::Duration::from_secs(5))
.connect() .connect()
.await? .await?
} else { } else {