From 7d324612ec92a9818860d0d0e1c4cff358fd6e5f Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Mon, 18 Aug 2014 13:17:35 +0100 Subject: Precent lack of presence visiblity from causing room /members/list to fail --- synapse/rest/room.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'synapse/rest') diff --git a/synapse/rest/room.py b/synapse/rest/room.py index 799dd58b2d..035209a19d 100644 --- a/synapse/rest/room.py +++ b/synapse/rest/room.py @@ -350,10 +350,14 @@ class RoomMemberListRestServlet(RestServlet): for event in members["chunk"]: target_user = self.hs.parse_userid(event["target_user_id"]) - presence_state = yield self.handlers.presence_handler.get_state( - target_user=target_user, auth_user=user - ) - event["content"].update(presence_state) + # Presence is an optional cache; don't fail if we can't fetch it + try: + presence_state = yield self.handlers.presence_handler.get_state( + target_user=target_user, auth_user=user + ) + event["content"].update(presence_state) + except: + pass defer.returnValue((200, members)) -- cgit 1.4.1 From b37ced8f63f64ab4fc1cff248fefddb5ebb6c957 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 18 Aug 2014 14:30:07 +0100 Subject: Update the default longpoll timeout time. --- synapse/rest/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synapse/rest') diff --git a/synapse/rest/events.py b/synapse/rest/events.py index dc811b813a..ca2f6978e5 100644 --- a/synapse/rest/events.py +++ b/synapse/rest/events.py @@ -24,7 +24,7 @@ from synapse.rest.base import RestServlet, client_path_pattern class EventStreamRestServlet(RestServlet): PATTERN = client_path_pattern("/events$") - DEFAULT_LONGPOLL_TIME_MS = 5000 + DEFAULT_LONGPOLL_TIME_MS = 30000 @defer.inlineCallbacks def on_GET(self, request): -- cgit 1.4.1