summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-18 15:53:40 +0100
committerErik Johnston <erik@matrix.org>2014-08-18 15:53:40 +0100
commitb4a1f2ccb58d6e17372dca310b627364d9792684 (patch)
tree4cbb906a7c33a810b5da2b9e2c60eac6d5738d6f /synapse/rest
parentAdd two different columns for ordering the events table, one which can be use... (diff)
parentUpdate the default longpoll timeout time. (diff)
downloadsynapse-b4a1f2ccb58d6e17372dca310b627364d9792684.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into sql_refactor
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/events.py2
-rw-r--r--synapse/rest/room.py12
2 files changed, 9 insertions, 5 deletions
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):
diff --git a/synapse/rest/room.py b/synapse/rest/room.py
index fe0953c69d..dfb2aabe70 100644
--- a/synapse/rest/room.py
+++ b/synapse/rest/room.py
@@ -353,10 +353,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))