Skip to content

Commit

Permalink
lower timesouts
Browse files Browse the repository at this point in the history
  • Loading branch information
ppca committed Oct 10, 2024
1 parent c08f6f0 commit d34f2fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chain-signatures/node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ fn is_running_on_gcp() -> bool {
let resp = reqwest::blocking::Client::new()
.get("http://metadata.google.internal/computeMetadata/v1/instance/id")
.header("Metadata-Flavor", "Google")
.timeout(Duration::from_secs(1))
.timeout(Duration::from_millis(200))
.send();

match resp {
Expand Down
2 changes: 1 addition & 1 deletion chain-signatures/node/src/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async fn send_encrypted<U: IntoUrl>(
.post(url.clone())
.header("content-type", "application/json")
.json(&message)
.timeout(Duration::from_secs(2))
.timeout(Duration::from_millis(200))
.send()
.await
.map_err(SendError::ReqwestClientError)?;
Expand Down
4 changes: 2 additions & 2 deletions chain-signatures/node/src/mesh/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl Pool {
let Ok(resp) = self
.http
.get(url.clone())
.timeout(Duration::from_secs(1))
.timeout(Duration::from_millis(200))
.send()
.await
else {
Expand Down Expand Up @@ -102,7 +102,7 @@ impl Pool {
let Ok(resp) = self
.http
.get(url)
.timeout(Duration::from_secs(1))
.timeout(Duration::from_millis(200))
.send()
.await
else {
Expand Down

0 comments on commit d34f2fa

Please sign in to comment.