summary refs log tree commit diff
path: root/synapse/handlers/federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-03 19:13:41 +0100
committerErik Johnston <erik@matrix.org>2014-09-03 19:13:41 +0100
commit9b18151104e146ffda03fbd7eeac676f55a8a879 (patch)
tree2c5f21ce70fc4b3ac54375c989ee57f2c5ec45d3 /synapse/handlers/federation.py
parentFix test to assert that we don't do auth (diff)
downloadsynapse-9b18151104e146ffda03fbd7eeac676f55a8a879.tar.xz
Handle timeouts slightly nicer.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/federation.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py
index 2b09a410f4..4a543a3976 100644
--- a/synapse/handlers/federation.py
+++ b/synapse/handlers/federation.py
@@ -232,7 +232,11 @@ class FederationHandler(BaseHandler):
         d = defer.Deferred()
         self.waiting_for_join_list.setdefault((joinee, room_id), []).append(d)
         reactor.callLater(10, d.cancel)
-        yield d
+
+        try:
+            yield d
+        except defer.CancelledError:
+            raise SynapseError("500", "Unable to join remote room")
 
         try:
             yield self.store.store_room(