From 73fb5d7b37675d39dcf23ef7e582ae7c75733c33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 2 Jul 2023 05:47:52 +0200 Subject: [PATCH] Continued: - flush instance data when an error has happened --- fba/http/federation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fba/http/federation.py b/fba/http/federation.py index 240bd73..4e38815 100644 --- a/fba/http/federation.py +++ b/fba/http/federation.py @@ -86,6 +86,10 @@ def fetch_instances(domain: str, origin: str, software: str, command: str, path: if peerlist is None or len(peerlist) == 0: logger.warning("Cannot fetch peers: domain='%s'", domain) + if instances.has_pending(domain): + logger.debug("Flushing updates for domain='%s' ...", domain) + instances.update_data(domain) + logger.debug("Invoking cookies.clear(%s) ...", domain) cookies.clear(domain) -- 2.39.5