Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #320 from matrix-org/appservice-retry-cap
Browse files Browse the repository at this point in the history
Cap the time to retry txns to appservices to 8.5 minutes
  • Loading branch information
erikjohnston committed Oct 22, 2015
2 parents 87da71b + 4dec901 commit c9c82e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions synapse/appservice/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ def recover(self):
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()

Expand Down

0 comments on commit c9c82e8

Please sign in to comment.