diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-08-28 17:36:46 -0700 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-08-28 17:36:46 -0700 |
commit | e3d3fbf63f6b75d3e0adfd71012163a2c673833b (patch) | |
tree | 0711e2e9bbfabcd83867ff524050c05441187882 /synapse/push/emailpusher.py | |
parent | black (diff) | |
parent | Merge branch 'develop' into uhoreg/e2e_cross-signing_merged (diff) | |
download | synapse-e3d3fbf63f6b75d3e0adfd71012163a2c673833b.tar.xz |
Merge branch 'uhoreg/e2e_cross-signing_merged' into cross-signing_keys
Diffstat (limited to 'synapse/push/emailpusher.py')
-rw-r--r-- | synapse/push/emailpusher.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/synapse/push/emailpusher.py b/synapse/push/emailpusher.py index 424ffa8b68..42e5b0c0a5 100644 --- a/synapse/push/emailpusher.py +++ b/synapse/push/emailpusher.py @@ -234,13 +234,19 @@ class EmailPusher(object): return self.last_stream_ordering = last_stream_ordering - yield self.store.update_pusher_last_stream_ordering_and_success( - self.app_id, - self.email, - self.user_id, - last_stream_ordering, - self.clock.time_msec(), + pusher_still_exists = ( + yield self.store.update_pusher_last_stream_ordering_and_success( + self.app_id, + self.email, + self.user_id, + last_stream_ordering, + self.clock.time_msec(), + ) ) + if not pusher_still_exists: + # The pusher has been deleted while we were processing, so + # lets just stop and return. + self.on_stop() def seconds_until(self, ts_msec): secs = (ts_msec - self.clock.time_msec()) / 1000 |