summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-11-08 11:54:10 +0000
committerGitHub <noreply@github.com>2017-11-08 11:54:10 +0000
commitd305987b40297fa282be200e6c9e040143a20ef8 (patch)
tree881de23c90bd8b1c8fdfd0ccf6599c758e6dfccc /synapse
parentMerge pull request #2637 from spantaleev/avoid-noop-media-deletes (diff)
parentRemove useless assignment in notify_interested_services (diff)
downloadsynapse-d305987b40297fa282be200e6c9e040143a20ef8.tar.xz
Merge pull request #2631 from xyzz/fix_appservice_event_backlog
Fix appservices being backlogged and not receiving new events due to a bug in notify_interested_services
Diffstat (limited to '')
-rw-r--r--synapse/handlers/appservice.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index 05af54d31b..543bf28aec 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -70,11 +70,10 @@ class ApplicationServicesHandler(object):
         with Measure(self.clock, "notify_interested_services"):
             self.is_processing = True
             try:
-                upper_bound = self.current_max
                 limit = 100
                 while True:
                     upper_bound, events = yield self.store.get_new_events_for_appservice(
-                        upper_bound, limit
+                        self.current_max, limit
                     )
 
                     if not events:
@@ -105,9 +104,6 @@ class ApplicationServicesHandler(object):
                             )
 
                     yield self.store.set_appservice_last_pos(upper_bound)
-
-                    if len(events) < limit:
-                        break
             finally:
                 self.is_processing = False