diff --git a/apps/fortuna/Cargo.lock b/apps/fortuna/Cargo.lock index 9c9e496696..d53f1b54f8 100644 --- a/apps/fortuna/Cargo.lock +++ b/apps/fortuna/Cargo.lock @@ -1554,7 +1554,7 @@ dependencies = [ [[package]] name = "fortuna" -version = "7.5.1" +version = "7.5.2" dependencies = [ "anyhow", "axum", diff --git a/apps/fortuna/Cargo.toml b/apps/fortuna/Cargo.toml index 1fa6a5f565..5bd969d159 100644 --- a/apps/fortuna/Cargo.toml +++ b/apps/fortuna/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fortuna" -version = "7.5.1" +version = "7.5.2" edition = "2021" [lib] diff --git a/apps/fortuna/src/eth_utils/traced_client.rs b/apps/fortuna/src/eth_utils/traced_client.rs index 3685f4d6c2..184c972eca 100644 --- a/apps/fortuna/src/eth_utils/traced_client.rs +++ b/apps/fortuna/src/eth_utils/traced_client.rs @@ -11,8 +11,10 @@ use { metrics::{counter::Counter, family::Family, histogram::Histogram}, registry::Registry, }, - std::{str::FromStr, sync::Arc}, + reqwest::Client, + std::{sync::Arc, time::Duration}, tokio::{sync::RwLock, time::Instant}, + url::Url, }; #[derive(Debug, Clone, PartialEq, Eq, Hash, EncodeLabelSet)] @@ -114,8 +116,13 @@ impl TracedClient { url: &str, metrics: Arc, ) -> Result> { + let url: Url = url.try_into()?; + let client = Client::builder() + .timeout(Duration::from_secs(10)) + .build() + .expect("Failed to create HTTP client"); Ok(Provider::new(TracedClient { - inner: Http::from_str(url)?, + inner: Http::new_with_client(url, client), chain_id, metrics, }))