diff options
author | reivilibre <38398653+reivilibre@users.noreply.github.com> | 2019-08-15 11:02:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-15 11:02:33 +0100 |
commit | 7809f0c0227f94d99ca126bc5c699cbdc125a529 (patch) | |
tree | 6ec3bafb7205a73c3b758216c10c2af0f3512ed0 /synapse | |
parent | 1.3.0rc1 (diff) | |
parent | Update changelog.d/5851.bugfix (diff) | |
download | synapse-7809f0c0227f94d99ca126bc5c699cbdc125a529.tar.xz |
Merge pull request #5851 from matrix-org/rei/roomdir_maybedeferred
Room Directory: Wrap `get_local_public_room_list` call in `maybeDeferred`
Diffstat (limited to 'synapse')
-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 |