diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-02-26 11:32:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-26 11:32:13 -0500 |
commit | 380122866f8cf7b891c95f10a60c83537ef6c780 (patch) | |
tree | f1b91ce761f54876fc8d34b2b1886b3c1f381db7 /synapse/federation/federation_base.py | |
parent | 1.11.0 (diff) | |
download | synapse-380122866f8cf7b891c95f10a60c83537ef6c780.tar.xz |
Cast a coroutine into a Deferred in the federation base (#6996)
Properly convert a coroutine into a Deferred in federation_base to fix an error when joining a room.
Diffstat (limited to '')
-rw-r--r-- | synapse/federation/federation_base.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/synapse/federation/federation_base.py b/synapse/federation/federation_base.py index eea64c1c9f..9fff65716a 100644 --- a/synapse/federation/federation_base.py +++ b/synapse/federation/federation_base.py @@ -96,12 +96,14 @@ class FederationBase(object): if not res and pdu.origin != origin: try: - res = yield self.get_pdu( - destinations=[pdu.origin], - event_id=pdu.event_id, - room_version=room_version, - outlier=outlier, - timeout=10000, + res = yield defer.ensureDeferred( + self.get_pdu( + destinations=[pdu.origin], + event_id=pdu.event_id, + room_version=room_version, + outlier=outlier, + timeout=10000, + ) ) except SynapseError: pass |