Add a delay to the federation loop for EDUs

This commit is contained in:
Richard van der Hoff 2019-02-24 22:24:36 +00:00
parent 0ea52872ab
commit 4d07dc0d18

View file

@ -380,7 +380,9 @@ class TransactionQueue(object):
else:
self.pending_edus_by_dest.setdefault(destination, []).append(edu)
self._attempt_new_transaction(destination)
# this is a bit of a hack, but we delay starting the transmission loop
# in an effort to batch up outgoing EDUs a bit.
self.clock.call_later(5.0, self._attempt_new_transaction, destination)
def send_device_messages(self, destination):
if destination == self.server_name: