Skip to content

Commit

Permalink
Introduce a timeout for EIP155 image fetching (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Antony1060 authored Mar 1, 2024
1 parent 8a97004 commit 8461cd2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shared/src/models/eip155/url.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use data_url::{DataUrl, DataUrlError};
use lazy_static::lazy_static;
use reqwest::header::HeaderValue;
Expand Down Expand Up @@ -129,6 +131,7 @@ impl URLUnparsed {

let client = reqwest::Client::builder()
.default_headers(client_headers)
.timeout(Duration::from_secs(4))
.build()?;

let res = client.get(&url).send().await?;
Expand Down

0 comments on commit 8461cd2

Please sign in to comment.