Skip to content

Commit

Permalink
Merge pull request #895 from near/xiangyi/remove_timeout
Browse files Browse the repository at this point in the history
remove timeout for send encrypted and /state
  • Loading branch information
ppca authored Oct 15, 2024
2 parents 534a598 + 95e017d commit d49cd4e
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 16 deletions.
1 change: 0 additions & 1 deletion chain-signatures/node/src/http_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ async fn send_encrypted<U: IntoUrl>(
.post(url.clone())
.header("content-type", "application/json")
.json(&message)
.timeout(Duration::from_millis(200))
.send()
.await
.map_err(SendError::ReqwestClientError)?;
Expand Down
16 changes: 2 additions & 14 deletions chain-signatures/node/src/mesh/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,7 @@ impl Pool {
continue;
};

let Ok(resp) = self
.http
.get(url.clone())
.timeout(Duration::from_millis(200))
.send()
.await
else {
let Ok(resp) = self.http.get(url.clone()).send().await else {
tracing::warn!(
"Pool.ping resp err participant {:?} url {}",
participant,
Expand Down Expand Up @@ -99,13 +93,7 @@ impl Pool {
continue;
};

let Ok(resp) = self
.http
.get(url)
.timeout(Duration::from_millis(200))
.send()
.await
else {
let Ok(resp) = self.http.get(url).send().await else {
continue;
};

Expand Down
124 changes: 123 additions & 1 deletion integration-tests/chain-signatures/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d49cd4e

Please sign in to comment.