Short connect timeout

This commit is contained in:
Louis Dureuil 2025-01-29 15:29:33 +01:00
parent 2f59a36fa7
commit 55c25b3202
No known key found for this signature in database

View File

@ -386,7 +386,10 @@ pub async fn perform_federated_search(
// run remote queries
let mut in_flight_remote_queries = BTreeMap::new();
let client = reqwest::Client::new();
let client = reqwest::ClientBuilder::new()
.connect_timeout(std::time::Duration::from_millis(200))
.build()
.unwrap();
let params =
ProxySearchParams { deadline: Some(deadline), try_count: 3, client: client.clone() };
for (node_name, (node, queries)) in remote_queries_by_host {