From f49e12db37e2aaac17f57f49bf6a63ab6639a379 Mon Sep 17 00:00:00 2001 From: Bauke Date: Thu, 22 Sep 2022 12:36:51 +0200 Subject: [PATCH] Sleep directly after HTTP requests. --- source/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/main.rs b/source/main.rs index 9745b2e..2d93826 100644 --- a/source/main.rs +++ b/source/main.rs @@ -110,6 +110,7 @@ fn main() -> Result<()> { .contains(&potential_feed.option) { let response = ureq_agent.get(&potential_feed.url).call()?; + sleep(timeout); if response.content_type() == "text/xml" { let body = response.into_string()?; let title_start = body.find("").unwrap() + 7; @@ -126,7 +127,6 @@ fn main() -> Result<()> { }; feeds_to_output.push(potential_feed); - sleep(timeout); progress.inc(1); } } else {