mirror of
https://github.com/element-hq/synapse
synced 2024-09-03 10:50:20 +00:00
synapse 500s on a call to publicRooms in the case where the number of public rooms is zero, the specific cause is due to xrange trying to use a step value of zero, but if the total room number really is zero then it makes sense to just bail and save the extra processing
This commit is contained in:
parent
b2da272b77
commit
349c739966
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue