summary refs log tree commit diff
path: root/synapse/http/federation
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-01-24 13:29:33 +0000
committerRichard van der Hoff <richard@matrix.org>2019-01-24 13:31:43 +0000
commitafd69a0920d16bdd9ca0c5cf9238e48986424ecb (patch)
tree356692eaa3ff578dc13e6f8ecb96e7ed50cd3845 /synapse/http/federation
parentlots more tests for MatrixFederationAgent (diff)
downloadsynapse-afd69a0920d16bdd9ca0c5cf9238e48986424ecb.tar.xz
Look up the right SRV record
Diffstat (limited to 'synapse/http/federation')
-rw-r--r--synapse/http/federation/matrix_federation_agent.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/http/federation/matrix_federation_agent.py b/synapse/http/federation/matrix_federation_agent.py
index 64c780a341..0ec28c6696 100644
--- a/synapse/http/federation/matrix_federation_agent.py
+++ b/synapse/http/federation/matrix_federation_agent.py
@@ -101,7 +101,8 @@ class MatrixFederationAgent(object):
         if port is not None:
             target = (host, port)
         else:
-            server_list = yield self._srv_resolver.resolve_service(server_name_bytes)
+            service_name = b"_matrix._tcp.%s" % (server_name_bytes, )
+            server_list = yield self._srv_resolver.resolve_service(service_name)
             if not server_list:
                 target = (host, 8448)
                 logger.debug("No SRV record for %s, using %s", host, target)