diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-02-01 11:19:54 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-01 11:19:54 +0000 |
commit | d9bdd26ae59e6162a106d4543b4eb8e0e306fab0 (patch) | |
tree | f1cb5b8aae82b5d725fee558fa13d0a13af8bcc5 /synapse/http | |
parent | v0.99.0rc3 (diff) | |
parent | Update federation routing logic to check .well-known before SRV (diff) | |
download | synapse-d9bdd26ae59e6162a106d4543b4eb8e0e306fab0.tar.xz |
Merge pull request #4539 from matrix-org/rav/update_wellknown_routing
Update federation routing logic to check .well-known before SRV
Diffstat (limited to 'synapse/http')
-rw-r--r-- | synapse/http/federation/matrix_federation_agent.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/http/federation/matrix_federation_agent.py b/synapse/http/federation/matrix_federation_agent.py index 26649e70be..57dcab4727 100644 --- a/synapse/http/federation/matrix_federation_agent.py +++ b/synapse/http/federation/matrix_federation_agent.py @@ -210,11 +210,7 @@ class MatrixFederationAgent(object): target_port=parsed_uri.port, )) - # try a SRV lookup - service_name = b"_matrix._tcp.%s" % (parsed_uri.host,) - server_list = yield self._srv_resolver.resolve_service(service_name) - - if not server_list and lookup_well_known: + if lookup_well_known: # try a .well-known lookup well_known_server = yield self._get_well_known(parsed_uri.host) @@ -250,6 +246,10 @@ class MatrixFederationAgent(object): res = yield self._route_matrix_uri(new_uri, lookup_well_known=False) defer.returnValue(res) + # try a SRV lookup + service_name = b"_matrix._tcp.%s" % (parsed_uri.host,) + server_list = yield self._srv_resolver.resolve_service(service_name) + if not server_list: target_host = parsed_uri.host port = 8448 |