Skip to content
Snippets Groups Projects
Unverified Commit 78e74ab8 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #5418 from matrix-org/erikj/fix_send_fed_with_limit_zero

Fix bug sending federation transactions with lots of EDUs
parents 01674479 48748c00
No related branches found
No related tags found
No related merge requests found
Fix bug where attempting to send transactions with large number of EDUs can fail.
......@@ -138,6 +138,10 @@ class DeviceInboxWorkerStore(SQLBaseStore):
if not has_changed or last_stream_id == current_stream_id:
return defer.succeed(([], current_stream_id))
if limit <= 0:
# This can happen if we run out of room for EDUs in the transaction.
return defer.succeed(([], last_stream_id))
def get_new_messages_for_remote_destination_txn(txn):
sql = (
"SELECT stream_id, messages_json FROM device_federation_outbox"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment