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:
2024-11-30 12:30:16 +01:00
parent 9b52376e7a
commit 717b052a88

View File

@@ -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 {