diff options
author | Erik Johnston <erik@matrix.org> | 2017-02-22 12:08:14 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-02-22 12:08:14 +0000 |
commit | 7455ba436a2903c8e6c9086c9ebe89f4c88af946 (patch) | |
tree | 71e9ccb8ccf92765cc53e5b5b57ad621eb1c3ec2 /synapse/push/emailpusher.py | |
parent | Store looping call (diff) | |
download | synapse-7455ba436a2903c8e6c9086c9ebe89f4c88af946.tar.xz |
Ensure we pass positive ints to delay function
Diffstat (limited to '')
-rw-r--r-- | synapse/push/emailpusher.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/push/emailpusher.py b/synapse/push/emailpusher.py index 2eb325c7c7..c7afd11111 100644 --- a/synapse/push/emailpusher.py +++ b/synapse/push/emailpusher.py @@ -218,7 +218,8 @@ class EmailPusher(object): ) def seconds_until(self, ts_msec): - return (ts_msec - self.clock.time_msec()) / 1000 + secs = (ts_msec - self.clock.time_msec()) / 1000 + return max(secs, 0) def get_room_throttle_ms(self, room_id): if room_id in self.throttle_params: |