From bca2974266c1a5aa8cd07d2f27df92ef0a843457 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Wed, 13 Nov 2024 17:01:23 +0100 Subject: [PATCH] Add timeout on read and write operations. --- milli/src/vector/rest.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/milli/src/vector/rest.rs b/milli/src/vector/rest.rs index 0568ec67f..05578ef1f 100644 --- a/milli/src/vector/rest.rs +++ b/milli/src/vector/rest.rs @@ -131,6 +131,7 @@ impl Embedder { let client = ureq::AgentBuilder::new() .max_idle_connections(REQUEST_PARALLELISM * 2) .max_idle_connections_per_host(REQUEST_PARALLELISM * 2) + .timeout(std::time::Duration::from_secs(30)) .build(); let request = Request::new(options.request)?;