summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:25:01 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-24 13:25:01 +0000
commit1bca0d40fc26764478966f62ff68fd2befaeea47 (patch)
tree39878c73bfa8b35fda6b9f0029ac20545d491cff
parentPort PresenceHandler to async/await (#6991) (diff)
parentCast a coroutine into a Deferred in the federation base (#6996) (diff)
downloadsynapse-1bca0d40fc26764478966f62ff68fd2befaeea47.tar.xz
Cast a coroutine into a Deferred in the federation base (#6996)
* commit '380122866':
  Cast a coroutine into a Deferred in the federation base (#6996)
-rw-r--r--changelog.d/6996.bugfix1
-rw-r--r--synapse/federation/federation_base.py14
2 files changed, 9 insertions, 6 deletions
diff --git a/changelog.d/6996.bugfix b/changelog.d/6996.bugfix
new file mode 100644

index 0000000000..765d376c7c --- /dev/null +++ b/changelog.d/6996.bugfix
@@ -0,0 +1 @@ +Fix bug which caused an error when joining a room, with `'coroutine' object has no attribute 'event_id'`. 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