summary refs log tree commit diff
path: root/synapse/handlers/events.py
diff options
context:
space:
mode:
authorDavid Baker <dbkr@matrix.org>2014-11-20 17:49:48 +0000
committerDavid Baker <dbkr@matrix.org>2014-11-20 17:49:48 +0000
commitf1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae (patch)
treeb1ebd402c0805f475500c9f36a0356322bf26f13 /synapse/handlers/events.py
parentSeparate out the matrix http client completely because just about all of its ... (diff)
parentFix pep8 codestyle warnings (diff)
downloadsynapse-f1c7f8e8131d6e5531e23e3bc2cd57ab7d1881ae.tar.xz
Merge branch 'develop' into http_client_refactor
Diffstat (limited to 'synapse/handlers/events.py')
-rw-r--r--synapse/handlers/events.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/handlers/events.py b/synapse/handlers/events.py
index 4993c92b74..d59221a4fb 100644
--- a/synapse/handlers/events.py
+++ b/synapse/handlers/events.py
@@ -56,7 +56,7 @@ class EventStreamHandler(BaseHandler):
                     self.clock.cancel_call_later(
                         self._stop_timer_per_user.pop(auth_user))
                 else:
-                    self.distributor.fire(
+                    yield self.distributor.fire(
                         "started_user_eventstream", auth_user
                     )
             self._streams_per_user[auth_user] += 1
@@ -65,8 +65,10 @@ class EventStreamHandler(BaseHandler):
                 pagin_config.from_token = None
 
             rm_handler = self.hs.get_handlers().room_member_handler
+            logger.debug("BETA")
             room_ids = yield rm_handler.get_rooms_for_user(auth_user)
 
+            logger.debug("ALPHA")
             with PreserveLoggingContext():
                 events, tokens = yield self.notifier.get_events_for(
                     auth_user, room_ids, pagin_config, timeout
@@ -93,7 +95,7 @@ class EventStreamHandler(BaseHandler):
                     logger.debug(
                         "_later stopped_user_eventstream %s", auth_user
                     )
-                    self.distributor.fire(
+                    yield self.distributor.fire(
                         "stopped_user_eventstream", auth_user
                     )
                     del self._stop_timer_per_user[auth_user]