Skip to content

Commit

Permalink
post review fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-prosser committed Jul 23, 2024
1 parent 8c0a600 commit cd3130f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1844,13 +1844,13 @@ impl Endpoints {
}
}

const DEFAULT_HTTP_TIMEOUT: Lazy<Option<Duration>> = Lazy::new(|| Some(Duration::from_secs(120)));
const DEFAULT_HTTP_TIMEOUT_SECONDS: u64 = 120;

fn build_http_client(config: &Config) -> Result<HttpClient> {
let mut builder = HttpClient::builder()
.gzip(true)
.danger_accept_invalid_certs(config.accept_invalid_certificates)
.timeout(DEFAULT_HTTP_TIMEOUT.clone());
.timeout(Some(Duration::from_secs(DEFAULT_HTTP_TIMEOUT_SECONDS)));

if let Some(proxy) = config.proxy.clone() {
builder = builder.proxy(Proxy::all(proxy).map_err(Error::BuildHttpClient)?);
Expand Down

0 comments on commit cd3130f

Please sign in to comment.