Merge pull request #320 from matrix-org/appservice-retry-cap

Cap the time to retry txns to appservices to 8.5 minutes
This commit is contained in:
Erik Johnston 2015-10-22 13:15:54 +01:00
commit c9c82e8f4d
1 changed files with 2 additions and 2 deletions

View File

@ -224,8 +224,8 @@ class _Recoverer(object):
self.clock.call_later((2 ** self.backoff_counter), self.retry)
def _backoff(self):
# cap the backoff to be around 18h => (2^16) = 65536 secs
if self.backoff_counter < 16:
# cap the backoff to be around 8.5min => (2^9) = 512 secs
if self.backoff_counter < 9:
self.backoff_counter += 1
self.recover()