summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-09-03 10:59:25 +0100
committerGitHub <noreply@github.com>2021-09-03 10:59:25 +0100
commitf58d202e3fc2c17bbe4ee24dd07f09888f73ef23 (patch)
tree6bd0c3b85e4e30295e921bb44051d9f3cdcb422d /synapse
parentFix documentation of directory name for remote thumbnails (#10556) (diff)
downloadsynapse-f58d202e3fc2c17bbe4ee24dd07f09888f73ef23.tar.xz
Fix bug with reusing 'txn' when persisting event. (#10743)
This will only happen when a server has multiple out of band membership
events in a single room.
Diffstat (limited to 'synapse')
-rw-r--r--synapse/storage/databases/main/events.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/events.py b/synapse/storage/databases/main/events.py
index 40b53274fb..096ae28788 100644
--- a/synapse/storage/databases/main/events.py
+++ b/synapse/storage/databases/main/events.py
@@ -575,7 +575,13 @@ class PersistEventsStore:
 
             missing_auth_chains.clear()
 
-            for auth_id, event_type, state_key, chain_id, sequence_number in txn:
+            for (
+                auth_id,
+                event_type,
+                state_key,
+                chain_id,
+                sequence_number,
+            ) in txn.fetchall():
                 event_to_types[auth_id] = (event_type, state_key)
 
                 if chain_id is None: