diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-03-06 16:41:19 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-03-06 16:41:19 +0000 |
commit | 64345b75597cba56e12a172fb227ac2c67993bbd (patch) | |
tree | f1c3547f6dde6b50c2130058269c599f26c9ecf9 /synapse/appservice | |
parent | Update UTs (diff) | |
download | synapse-64345b75597cba56e12a172fb227ac2c67993bbd.tar.xz |
Upper bound the backoff.
Diffstat (limited to 'synapse/appservice')
-rw-r--r-- | synapse/appservice/scheduler.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/appservice/scheduler.py b/synapse/appservice/scheduler.py index 514148c947..ee5978da6e 100644 --- a/synapse/appservice/scheduler.py +++ b/synapse/appservice/scheduler.py @@ -214,7 +214,9 @@ class _Recoverer(object): self.backoff_counter = 1 yield self.retry() else: - self.backoff_counter += 1 + # cap the backoff to be around 18h => (2^16) = 65536 secs + if self.backoff_counter < 16: + self.backoff_counter += 1 self.recover() else: self._set_service_recovered() |