mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-21 06:34:00 +01:00
actually reset retry schedule if we can successfuly talk to it
This commit is contained in:
parent
5cd43d4b9f
commit
9c43b258ec
2 changed files with 9 additions and 0 deletions
|
@ -864,6 +864,9 @@ class _TransactionQueue(object):
|
||||||
|
|
||||||
for deferred in deferreds:
|
for deferred in deferreds:
|
||||||
if code == 200:
|
if code == 200:
|
||||||
|
if retry_last_ts:
|
||||||
|
# this host is alive! reset retry schedule
|
||||||
|
self.store.set_destination_retry_timings(destination, 0, 0)
|
||||||
deferred.callback(None)
|
deferred.callback(None)
|
||||||
else:
|
else:
|
||||||
self.start_retrying(destination, retry_interval)
|
self.start_retrying(destination, retry_interval)
|
||||||
|
|
|
@ -208,6 +208,12 @@ class FederationHandler(BaseHandler):
|
||||||
affected=event.event_id,
|
affected=event.event_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# if we're receiving valid events from an origin,
|
||||||
|
# it's probably a good idea to mark it as not in retry-state
|
||||||
|
# for sending (although this is a bit of a leap)
|
||||||
|
if ((self.store.get_destination_retry_timings(origin))[0]):
|
||||||
|
self.store.set_destination_retry_timings(origin, 0, 0)
|
||||||
|
|
||||||
room = yield self.store.get_room(event.room_id)
|
room = yield self.store.get_room(event.room_id)
|
||||||
|
|
||||||
if not room:
|
if not room:
|
||||||
|
|
Loading…
Reference in a new issue