summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-17 18:04:42 +0100
committerErik Johnston <erik@matrix.org>2019-06-18 15:02:18 +0100
commitb42f90470f00831bfd9b7ebca19111ed229599b0 (patch)
tree9e6a7011d237f4149567fb3e2cf2e32b39879d11 /synapse/federation
parentMerge pull request #5385 from matrix-org/erikj/reduce_http_exceptions (diff)
downloadsynapse-b42f90470f00831bfd9b7ebca19111ed229599b0.tar.xz
Add experimental option to reduce extremities.
Adds new config option `cleanup_extremities_with_dummy_events` which
periodically sends dummy events to rooms with more than 10 extremities.

THIS IS REALLY EXPERIMENTAL.
Diffstat (limited to 'synapse/federation')
-rw-r--r--synapse/federation/sender/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/federation/sender/__init__.py b/synapse/federation/sender/__init__.py
index 4f0f939102..4224b29ecf 100644
--- a/synapse/federation/sender/__init__.py
+++ b/synapse/federation/sender/__init__.py
@@ -168,6 +168,9 @@ class FederationSender(object):
                     if not is_mine and send_on_behalf_of is None:
                         return
 
+                    if not event.internal_metadata.should_proactively_send():
+                        return
+
                     try:
                         # Get the state from before the event.
                         # We need to make sure that this is the state from before