mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-22 12:34:57 -05: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 logging
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from twisted.internet.defer import maybeDeferred
|
||||||
|
|
||||||
import synapse
|
import synapse
|
||||||
import synapse.logging.opentracing as opentracing
|
import synapse.logging.opentracing as opentracing
|
||||||
from synapse.api.errors import Codes, FederationDeniedError, SynapseError
|
from synapse.api.errors import Codes, FederationDeniedError, SynapseError
|
||||||
@ -745,8 +747,12 @@ class PublicRoomList(BaseFederationServlet):
|
|||||||
else:
|
else:
|
||||||
network_tuple = ThirdPartyInstanceID(None, None)
|
network_tuple = ThirdPartyInstanceID(None, None)
|
||||||
|
|
||||||
data = await self.handler.get_local_public_room_list(
|
data = await maybeDeferred(
|
||||||
limit, since_token, network_tuple=network_tuple, from_federation=True
|
self.handler.get_local_public_room_list,
|
||||||
|
limit,
|
||||||
|
since_token,
|
||||||
|
network_tuple=network_tuple,
|
||||||
|
from_federation=True,
|
||||||
)
|
)
|
||||||
return 200, data
|
return 200, data
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user