From 9b18151104e146ffda03fbd7eeac676f55a8a879 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Wed, 3 Sep 2014 19:13:41 +0100 Subject: [PATCH] Handle timeouts slightly nicer. --- synapse/handlers/federation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(