Skip to content

Commit

Permalink
Fixup changelog and remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Aug 16, 2019
1 parent 1771f00 commit 861d663
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog.d/5850.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add retry to well-known lookups if we have recently seen a valid well-known record for the server.
1 change: 0 additions & 1 deletion changelog.d/5850.misc

This file was deleted.

5 changes: 1 addition & 4 deletions synapse/http/federation/well_known_resolver.py
Original file line number Diff line number Diff line change
@@ -163,9 +163,7 @@ def _fetch_well_known(self, server_name):
Deferred[Tuple[bytes,int]]: The lookup result and cache period.
"""

had_valid_well_known = bool(
self._had_valid_well_known_cache.get(server_name, False)
)
had_valid_well_known = self._had_valid_well_known_cache.get(server_name, False)

# We do this in two steps to differentiate between possibly transient
# errors (e.g. can't connect to host, 503 response) and more permenant
@@ -247,7 +245,6 @@ def _make_well_known_request(self, server_name, retry):
# Bail if we've been cancelled
raise
except Exception as e:
logger.info("Retry: %s", retry)
if not retry or i >= WELL_KNOWN_RETRY_ATTEMPTS:
logger.info("Error fetching %s: %s", uri_str, e)
raise _FetchWellKnownFailure(temporary=True)

0 comments on commit 861d663

Please sign in to comment.