]> git.ipfire.org Git - dbl.git/commitdiff
sources: Ignore if the server suddenly closes the connection
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Feb 2026 09:21:52 +0000 (09:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Feb 2026 09:21:52 +0000 (09:21 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dbl/sources.py

index 9e88b94ccdc06a71db740a21c04115789dcd431c..b6d09f2fb91659a34ff6430f86e9ae024f545b28 100644 (file)
@@ -347,6 +347,12 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True):
 
                                        return False
 
+                               # Ignore if the connection got interrupted
+                               except httpx.RemoteProtocolError as e:
+                                       log.warning("Server suddenly closed the connection: %s" % e)
+
+                                       return False
+
                        # Mark all domains that have not been updated as removed
                        await self.__prune()