mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Fix copy + paste fails
This commit is contained in:
parent
4c56bedee3
commit
bcc9cda8ca
@ -411,8 +411,13 @@ class FederationClient(FederationBase):
|
|||||||
return srvs
|
return srvs
|
||||||
|
|
||||||
batch_size = 20
|
batch_size = 20
|
||||||
for i in xrange(0, len(missing_events), batch_size):
|
while missing_events:
|
||||||
batch = missing_events[i:i + batch_size]
|
batch = []
|
||||||
|
try:
|
||||||
|
for _ in range(0, batch_size):
|
||||||
|
batch.append(missing_events.pop())
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
deferreds = [
|
deferreds = [
|
||||||
self.get_pdu(
|
self.get_pdu(
|
||||||
@ -423,9 +428,9 @@ class FederationClient(FederationBase):
|
|||||||
]
|
]
|
||||||
|
|
||||||
res = yield defer.DeferredList(deferreds, consumeErrors=True)
|
res = yield defer.DeferredList(deferreds, consumeErrors=True)
|
||||||
for (result, val), (e_id, _) in res:
|
for success, (result, e_id) in res:
|
||||||
if result and val:
|
if success and result:
|
||||||
signed_events.append(val)
|
signed_events.append(result)
|
||||||
else:
|
else:
|
||||||
failed_to_fetch.add(e_id)
|
failed_to_fetch.add(e_id)
|
||||||
|
|
||||||
|
@ -623,7 +623,7 @@ class FederationServer(FederationBase):
|
|||||||
origin, pdu.room_id, pdu.event_id,
|
origin, pdu.room_id, pdu.event_id,
|
||||||
)
|
)
|
||||||
except:
|
except:
|
||||||
logger.warn("Failed to get state for event: %s", pdu.event_id)
|
logger.exception("Failed to get state for event: %s", pdu.event_id)
|
||||||
|
|
||||||
yield self.handler.on_receive_pdu(
|
yield self.handler.on_receive_pdu(
|
||||||
origin,
|
origin,
|
||||||
|
Loading…
Reference in New Issue
Block a user