summary refs log tree commit diff
path: root/synapse/appservice/scheduler.py
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/appservice/scheduler.py')
-rw-r--r--synapse/appservice/scheduler.py4
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()