Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Cast a coroutine into a Deferred in the federation base (#6996)
Browse files Browse the repository at this point in the history
* commit '380122866':
  Cast a coroutine into a Deferred in the federation base (#6996)
  • Loading branch information
anoadragon453 committed Mar 24, 2020
2 parents b2e71e3 + 3801228 commit 1bca0d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions changelog.d/6996.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bug which caused an error when joining a room, with `'coroutine' object has no attribute 'event_id'`.
14 changes: 8 additions & 6 deletions synapse/federation/federation_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,14 @@ def handle_check_result(pdu, deferred):

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
Expand Down

0 comments on commit 1bca0d4

Please sign in to comment.