feat: add short connect timeout
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
9b52376e7a
commit
717b052a88
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user