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.
This commit is contained in:
parent
9c1b83b007
commit
380122866f
|
@ -0,0 +1 @@
|
||||||
|
Fix bug which caused an error when joining a room, with `'coroutine' object has no attribute 'event_id'`.
|
|
@ -96,13 +96,15 @@ class FederationBase(object):
|
||||||
|
|
||||||
if not res and pdu.origin != origin:
|
if not res and pdu.origin != origin:
|
||||||
try:
|
try:
|
||||||
res = yield self.get_pdu(
|
res = yield defer.ensureDeferred(
|
||||||
|
self.get_pdu(
|
||||||
destinations=[pdu.origin],
|
destinations=[pdu.origin],
|
||||||
event_id=pdu.event_id,
|
event_id=pdu.event_id,
|
||||||
room_version=room_version,
|
room_version=room_version,
|
||||||
outlier=outlier,
|
outlier=outlier,
|
||||||
timeout=10000,
|
timeout=10000,
|
||||||
)
|
)
|
||||||
|
)
|
||||||
except SynapseError:
|
except SynapseError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue