mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Merge pull request #5851 from matrix-org/rei/roomdir_maybedeferred
Room Directory: Wrap `get_local_public_room_list` call in `maybeDeferred`
This commit is contained in:
commit
7809f0c022
2
changelog.d/5851.bugfix
Normal file
2
changelog.d/5851.bugfix
Normal file
@ -0,0 +1,2 @@
|
||||
Fix 500 Internal Server Error on `publicRooms` when the public room list was
|
||||
cached.
|
@ -19,6 +19,8 @@ import functools
|
||||
import logging
|
||||
import re
|
||||
|
||||
from twisted.internet.defer import maybeDeferred
|
||||
|
||||
import synapse
|
||||
import synapse.logging.opentracing as opentracing
|
||||
from synapse.api.errors import Codes, FederationDeniedError, SynapseError
|
||||
@ -745,8 +747,12 @@ class PublicRoomList(BaseFederationServlet):
|
||||
else:
|
||||
network_tuple = ThirdPartyInstanceID(None, None)
|
||||
|
||||
data = await self.handler.get_local_public_room_list(
|
||||
limit, since_token, network_tuple=network_tuple, from_federation=True
|
||||
data = await maybeDeferred(
|
||||
self.handler.get_local_public_room_list,
|
||||
limit,
|
||||
since_token,
|
||||
network_tuple=network_tuple,
|
||||
from_federation=True,
|
||||
)
|
||||
return 200, data
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user