summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-04 13:55:10 +0000
committerErik Johnston <erik@matrix.org>2015-02-04 13:55:10 +0000
commitff78eded015b7596e883623bf826aa579662e766 (patch)
treeb319c248cb17b6751d656b9379e27ecfe885025c /synapse/federation
parentBrief comment on why we do some things on every call to persist_event and not... (diff)
downloadsynapse-ff78eded015b7596e883623bf826aa579662e766.tar.xz
Retry make_join
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/federation_client.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/synapse/federation/federation_client.py b/synapse/federation/federation_client.py
index 5fac629709..d6b8c43916 100644
--- a/synapse/federation/federation_client.py
+++ b/synapse/federation/federation_client.py
@@ -251,16 +251,21 @@ class FederationClient(FederationBase):
         defer.returnValue(signed_auth)
 
     @defer.inlineCallbacks
-    def make_join(self, destination, room_id, user_id):
-        ret = yield self.transport_layer.make_join(
-            destination, room_id, user_id
-        )
+    def make_join(self, destinations, room_id, user_id):
+        for destination in destinations:
+            try:
+                ret = yield self.transport_layer.make_join(
+                    destination, room_id, user_id
+                )
 
-        pdu_dict = ret["event"]
+                pdu_dict = ret["event"]
 
-        logger.debug("Got response to make_join: %s", pdu_dict)
+                logger.debug("Got response to make_join: %s", pdu_dict)
 
-        defer.returnValue(self.event_from_pdu_json(pdu_dict))
+                defer.returnValue(self.event_from_pdu_json(pdu_dict))
+                break
+            except Exception as e:
+                logger.warn("Failed to make_join via %s", destination)
 
     @defer.inlineCallbacks
     def send_join(self, destination, pdu):