mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Slightly more aggressive retry timers at HTTP level
This commit is contained in:
parent
9eff52d1a6
commit
bceec65913
@ -56,7 +56,7 @@ incoming_responses_counter = metrics.register_counter(
|
||||
)
|
||||
|
||||
|
||||
MAX_RETRIES = 4
|
||||
MAX_RETRIES = 10
|
||||
|
||||
|
||||
class MatrixFederationEndpointFactory(object):
|
||||
@ -184,7 +184,8 @@ class MatrixFederationHttpClient(object):
|
||||
)
|
||||
|
||||
if retries_left and not timeout:
|
||||
delay = 5 ** (MAX_RETRIES + 1 - retries_left)
|
||||
delay = 4 ** (MAX_RETRIES + 1 - retries_left)
|
||||
delay = max(delay, 60)
|
||||
delay *= random.uniform(0.8, 1.4)
|
||||
yield sleep(delay)
|
||||
retries_left -= 1
|
||||
|
Loading…
Reference in New Issue
Block a user