From b41090578da4ddea2f6d524314ae672df039c8d3 Mon Sep 17 00:00:00 2001 From: prplV Date: Wed, 30 Apr 2025 07:03:36 -0400 Subject: [PATCH] timeout added --- crates/api-grub/src/jitter.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/api-grub/src/jitter.rs b/crates/api-grub/src/jitter.rs index dcdc8f2..a41cd1c 100644 --- a/crates/api-grub/src/jitter.rs +++ b/crates/api-grub/src/jitter.rs @@ -37,6 +37,7 @@ impl Requester { pub async fn get_conferences(&self) -> anyhow::Result { let url = format!("{}{}", self.base, *CONFERENCES_ENDPOINT); let req = self.client.get(url) + .timeout(tokio::time::Duration::from_secs(10)) .header("accept", "application/json") .header("x-api-key", &self.api_key); let resp = req.send().await; @@ -83,6 +84,7 @@ impl Requester { for conf in conferences { let url = format!("{}{}{}", self.base, *USERS_ENDPOINT, &conf.1); let req = self.client.get(url) + .timeout(tokio::time::Duration::from_secs(10)) .header("accept", "application/json") .header("x-api-key", &self.api_key); -- 2.40.1