From: Michael Tremer Date: Tue, 13 Jan 2026 10:59:07 +0000 (+0000) Subject: sources: Catch any connect timeouts X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1324721fd939d08f7f2c3f38a1e7cddaaa1a896;p=dbl.git sources: Catch any connect timeouts Signed-off-by: Michael Tremer --- diff --git a/src/dbl/sources.py b/src/dbl/sources.py index 94be2d0..bd4ae37 100644 --- a/src/dbl/sources.py +++ b/src/dbl/sources.py @@ -313,6 +313,12 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): # The list has now been updated self.updated_at = sqlmodel.func.current_timestamp() + # Catch any timeouts + except httpx.ConnectTimeout as e: + log.warning("Failed to connect to %s: %s" % (self.url, e)) + + return False + # Skip if we could not read from the server except httpx.ReadTimeout as e: log.warning("Failed to read the server's response: %s" % e)