summary refs log tree commit diff
path: root/synapse/notifier.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-05-10 10:39:54 +0100
committerGitHub <noreply@github.com>2022-05-10 10:39:54 +0100
commit8dd3e0e084304dfc02ff072a1beaed5266cf4e33 (patch)
treeb546dc87747960e269c98276115f18c4842e2d92 /synapse/notifier.py
parentImplement MSC3786: Add a default push rule to ignore m.room.server_acl events... (diff)
downloadsynapse-8dd3e0e084304dfc02ff072a1beaed5266cf4e33.tar.xz
Immediately retry any requests that have backed off when a server comes back online. (#12500)
Otherwise it can take up to a minute for any in-flight `/send` requests to be retried.
Diffstat (limited to 'synapse/notifier.py')
-rw-r--r--synapse/notifier.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/notifier.py b/synapse/notifier.py
index 16d15a1f33..01a50b9d62 100644
--- a/synapse/notifier.py
+++ b/synapse/notifier.py
@@ -228,9 +228,7 @@ class Notifier:
         # Called when there are new things to stream over replication
         self.replication_callbacks: List[Callable[[], None]] = []
 
-        # Called when remote servers have come back online after having been
-        # down.
-        self.remote_server_up_callbacks: List[Callable[[str], None]] = []
+        self._federation_client = hs.get_federation_http_client()
 
         self._third_party_rules = hs.get_third_party_event_rules()
 
@@ -731,3 +729,7 @@ class Notifier:
         # circular dependencies.
         if self.federation_sender:
             self.federation_sender.wake_destination(server)
+
+        # Tell the federation client about the fact the server is back up, so
+        # that any in flight requests can be immediately retried.
+        self._federation_client.wake_destination(server)