summary refs log tree commit diff
path: root/synapse/push/httppusher.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-08 14:06:54 +0100
committerDavid Baker <dave@matrix.org>2016-04-08 14:06:54 +0100
commit52d1008661cebe8551bffd97b938369550851bc6 (patch)
tree0684d65b200936d180c0001066469dca7ef347f5 /synapse/push/httppusher.py
parentComment why unsafe process is unsafe (diff)
downloadsynapse-52d1008661cebe8551bffd97b938369550851bc6.tar.xz
Unsafe process should call itself if the max has changed
Diffstat (limited to 'synapse/push/httppusher.py')
-rw-r--r--synapse/push/httppusher.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index 685c5e48df..6ef8bf62b3 100644
--- a/synapse/push/httppusher.py
+++ b/synapse/push/httppusher.py
@@ -125,6 +125,7 @@ class HttpPusher(object):
         Never call this directly: use _process which will only allow this to
         run once per pusher.
         """
+        starting_max_ordering = self.max_stream_ordering
         unprocessed = yield self.store.get_unread_push_actions_for_user_in_range(
             self.user_id, self.last_stream_ordering, self.max_stream_ordering
         )
@@ -185,6 +186,8 @@ class HttpPusher(object):
                     self.timed_call = reactor.callLater(self.backoff_delay, self.on_timer)
                     self.backoff_delay = min(self.backoff_delay * 2, self.MAX_BACKOFF_SEC)
                     break
+        if self.max_stream_ordering != starting_max_ordering:
+            self._unsafe_process()
 
     @defer.inlineCallbacks
     def _process_one(self, push_action):