From c4571c9cdd81a7b7467a614632f0275a52b726d8 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 1 Jul 2020 10:19:29 +0100 Subject: [PATCH] Don't send empty transactions --- federationsender/queue/destinationqueue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/federationsender/queue/destinationqueue.go b/federationsender/queue/destinationqueue.go index 98072b23f..0d62b4361 100644 --- a/federationsender/queue/destinationqueue.go +++ b/federationsender/queue/destinationqueue.go @@ -322,6 +322,10 @@ func (oq *destinationQueue) nextTransaction( return false, fmt.Errorf("oq.db.GetNextTransactionPDUs: %w", err) } + if len(pdus) == 0 && len(pendingEDUs) == 0 { + return false, nil + } + if txid != "" { // The database supplied us with a transaction ID to use // from a failed PDU so use that.