1
0

Fix bug in calculating the federation retry backoff period (#6025)

This commit is contained in:
Andrew Morgan
2020-02-25 14:27:19 +00:00
2 changed files with 4 additions and 2 deletions

1
changelog.d/6025.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix bug in calculating the federation retry backoff period.

View File

@@ -193,8 +193,9 @@ class RetryDestinationLimiter(object):
else:
# We couldn't connect.
if self.retry_interval:
self.retry_interval *= RETRY_MULTIPLIER
self.retry_interval *= int(random.uniform(0.8, 1.4))
self.retry_interval = int(
self.retry_interval * RETRY_MULTIPLIER * random.uniform(0.8, 1.4)
)
if self.retry_interval >= MAX_RETRY_INTERVAL:
self.retry_interval = MAX_RETRY_INTERVAL