recover from failed JSON parse attempt

This commit is contained in:
Nils Büchner 2024-09-19 17:27:41 +02:00
parent 1547d3f1b5
commit ab6c8b78d7

View file

@ -249,10 +249,12 @@ class InviteChecker:
# Update cache if expired # Update cache if expired
if current_time - self.cache_timestamp > self.cache_expiry_time: if current_time - self.cache_timestamp > self.cache_expiry_time:
self.allow_all_invites_on_error = False
yield self.update_blocklist_allowlist() yield self.update_blocklist_allowlist()
if self.allow_all_invites_on_error: if self.allow_all_invites_on_error:
logger.info("Skipping allowlist/blocklist checks because of previous JSON fetch failure.") logger.info("Skipping allowlist/blocklist checks because of previous JSON fetch failure.")
self.allow_all_invites_on_error = False
returnValue((set(), set(), set())) returnValue((set(), set(), set()))
# Return cached blocklist, allowlist, and blocklist room IDs # Return cached blocklist, allowlist, and blocklist room IDs