From 54f168a99cdf318fb0be5f60b213092778fbe45d Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 3 Apr 2020 12:33:26 +0100 Subject: [PATCH] Add comments --- federationsender/queue/destinationqueue.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/federationsender/queue/destinationqueue.go b/federationsender/queue/destinationqueue.go index 231f08c67..7d4dc850b 100644 --- a/federationsender/queue/destinationqueue.go +++ b/federationsender/queue/destinationqueue.go @@ -101,8 +101,8 @@ func (oq *destinationQueue) backgroundSend() { } // nextTransaction creates a new transaction from the pending event -// queue and sends it. -// Returns nil if the queue was empty. +// queue and sends it. Returns true if a transaction was sent or +// false otherwise. func (oq *destinationQueue) nextTransaction() bool { oq.runningMutex.Lock() defer oq.runningMutex.Unlock() @@ -154,6 +154,8 @@ func (oq *destinationQueue) nextTransaction() bool { return true } +// nextInvite takes pending invite events from the queue and sends +// them. Returns true if a transaction was sent or false otherwise. func (oq *destinationQueue) nextInvites() bool { oq.runningMutex.Lock() defer oq.runningMutex.Unlock()