fix: add client connect timeout to scheduled task (#3883)

This commit is contained in:
Alex Roman 2023-08-21 09:53:35 +01:00 committed by GitHub
parent ee7b35a04a
commit ab828b81e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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