diff options
-rw-r--r-- | synapse/handlers/room_list.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py index bb40075387..ae5db4d2c5 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py @@ -186,6 +186,11 @@ class RoomListHandler(BaseHandler): logger.info("After sorting and filtering, %i rooms remain", len(rooms_to_scan)) + #bail if no rooms to work on + if len(rooms_to_scan) == 0: + defer.returnValue([]) + + # _append_room_entry_to_chunk will append to chunk but will stop if # len(chunk) > limit # |