From adc7cc459f1c618405ffce82777d53e69b376494 Mon Sep 17 00:00:00 2001 From: Nulo Date: Fri, 12 Jan 2024 18:45:00 -0300 Subject: [PATCH] timeout --- scraper-rs/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scraper-rs/src/main.rs b/scraper-rs/src/main.rs index 456bb35..7cf98ee 100644 --- a/scraper-rs/src/main.rs +++ b/scraper-rs/src/main.rs @@ -118,7 +118,11 @@ fn connect_db() -> Pool { } fn build_client() -> reqwest::Client { - reqwest::ClientBuilder::default().build().unwrap() + reqwest::ClientBuilder::default() + .timeout(Duration::from_secs(60 * 5)) + .connect_timeout(Duration::from_secs(60)) + .build() + .unwrap() } #[derive(Default, Debug)]