fix: apply timeout to everything
This commit is contained in:
parent
9c26b68806
commit
447b073110
1 changed files with 2 additions and 0 deletions
|
@ -85,6 +85,8 @@ impl EndpointConfig {
|
||||||
let client = reqwest::Client::builder()
|
let client = reqwest::Client::builder()
|
||||||
.user_agent(opts.user_agent.as_deref().unwrap_or(APP_USER_AGENT))
|
.user_agent(opts.user_agent.as_deref().unwrap_or(APP_USER_AGENT))
|
||||||
.timeout(std::time::Duration::from_secs(opts.timeout.unwrap_or(30)))
|
.timeout(std::time::Duration::from_secs(opts.timeout.unwrap_or(30)))
|
||||||
|
.read_timeout(std::time::Duration::from_secs(opts.timeout.unwrap_or(30)))
|
||||||
|
.connect_timeout(std::time::Duration::from_secs(opts.timeout.unwrap_or(30)))
|
||||||
.redirect(opts.redirects.map(reqwest::redirect::Policy::limited).unwrap_or(reqwest::redirect::Policy::none()))
|
.redirect(opts.redirects.map(reqwest::redirect::Policy::limited).unwrap_or(reqwest::redirect::Policy::none()))
|
||||||
.danger_accept_invalid_certs(opts.accept_invalid_certs.unwrap_or(false))
|
.danger_accept_invalid_certs(opts.accept_invalid_certs.unwrap_or(false))
|
||||||
.build()?;
|
.build()?;
|
||||||
|
|
Loading…
Reference in a new issue