summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-06-01 11:55:08 +0100
committerErik Johnston <erik@matrix.org>2018-06-01 11:55:08 +0100
commitc33810d9ccd6cb954eaf2924ecdbdcc0a79e67af (patch)
tree3039821bbd61dec6b970b9a2c7ae531e92609ce2
parentRemove spurious break (diff)
downloadsynapse-c33810d9ccd6cb954eaf2924ecdbdcc0a79e67af.tar.xz
Remove spurious conditional
-rw-r--r--synapse/storage/stream.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 5062bf4e47..0d32a3a498 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -828,8 +828,8 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
 
             rows.extend(new_rows)
 
-        if limit > 0:
-            rows = rows[:limit]
+        # We may have inserted more rows than necessary in the loop above
+        rows = rows[:limit]
 
         if rows:
             chunk = rows[-1].chunk_id