]> Untitled Git - lemmy.git/commitdiff
fix: add client connect timeout to scheduled task (#3883)
authorAlex Roman <alexandrupero@users.noreply.github.com>
Mon, 21 Aug 2023 08:53:35 +0000 (09:53 +0100)
committerGitHub <noreply@github.com>
Mon, 21 Aug 2023 08:53:35 +0000 (10:53 +0200)
src/scheduled_tasks.rs

index 28315beaae815c7bfd36a3858611fbbcc5396f98..a9349472718fbf09a1f2a73927ed6e8d00d63bb0 100644 (file)
@@ -364,6 +364,7 @@ fn update_instance_software(conn: &mut PgConnection, user_agent: &str) -> LemmyR
   let client = Client::builder()
     .user_agent(user_agent)
     .timeout(REQWEST_TIMEOUT)
+    .connect_timeout(REQWEST_TIMEOUT)
     .build()?;
 
   let instances = instance::table.get_results::<Instance>(conn)?;