diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-20 16:05:55 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-02-20 16:05:55 +0000 |
commit | 0b57f0de3ff750c280800bc3841ae24280f5653a (patch) | |
tree | b16d6f2a0525c07eec0cf73cbbc656cd679f327a /synapse/federation | |
parent | Don't create broken room when power_level_content_override.users does not con... (diff) | |
parent | Merge pull request #5851 from matrix-org/rei/roomdir_maybedeferred (diff) | |
download | synapse-0b57f0de3ff750c280800bc3841ae24280f5653a.tar.xz |
Merge pull request #5851 from matrix-org/rei/roomdir_maybedeferred
Diffstat (limited to 'synapse/federation')
-rw-r--r-- | synapse/federation/transport/server.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/federation/transport/server.py b/synapse/federation/transport/server.py index ea4e1b6d0f..9a86bd0263 100644 --- a/synapse/federation/transport/server.py +++ b/synapse/federation/transport/server.py @@ -19,6 +19,8 @@ import functools import logging import re +from twisted.internet.defer import maybeDeferred + import synapse import synapse.logging.opentracing as opentracing from synapse.api.errors import Codes, FederationDeniedError, SynapseError @@ -745,8 +747,12 @@ class PublicRoomList(BaseFederationServlet): else: network_tuple = ThirdPartyInstanceID(None, None) - data = await self.handler.get_local_public_room_list( - limit, since_token, network_tuple=network_tuple, from_federation=True + data = await maybeDeferred( + self.handler.get_local_public_room_list, + limit, + since_token, + network_tuple=network_tuple, + from_federation=True, ) return 200, data |