From c33810d9ccd6cb954eaf2924ecdbdcc0a79e67af Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 1 Jun 2018 11:55:08 +0100 Subject: Remove spurious conditional --- synapse/storage/stream.py | 4 ++-- 1 file 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 -- cgit 1.5.1