Add timeouts to HTTP requests (#3908)

This commit is contained in:
iequidoo
2023-01-11 11:55:42 -03:00
committed by iequidoo
parent 6642083f52
commit 6d9d31cad1
6 changed files with 25 additions and 4 deletions

View File

@@ -381,7 +381,7 @@ struct CreateAccountErrorResponse {
#[allow(clippy::indexing_slicing)]
async fn set_account_from_qr(context: &Context, qr: &str) -> Result<()> {
let url_str = &qr[DCACCOUNT_SCHEME.len()..];
let response = reqwest::Client::new().post(url_str).send().await?;
let response = crate::http::get_client()?.post(url_str).send().await?;
let response_status = response.status();
let response_text = response.text().await.with_context(|| {
format!(