summary refs log tree commit diff
path: root/synapse/storage/user_directory.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage/user_directory.py')
-rw-r--r--synapse/storage/user_directory.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/storage/user_directory.py b/synapse/storage/user_directory.py
index 9137fc24ea..348064436f 100644
--- a/synapse/storage/user_directory.py
+++ b/synapse/storage/user_directory.py
@@ -221,6 +221,7 @@ class UserDirectoryStore(SQLBaseStore):
             txn.execute(sql, (prev_stream_id,))
 
             total = 0
+            max_stream_id = prev_stream_id
             for max_stream_id, count in txn:
                 total += count
                 if total > 50: