mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Tweaks
This commit is contained in:
parent
cbf5f6ee89
commit
89bf8c493e
|
|
@ -174,9 +174,8 @@ func (oqs *OutgoingQueues) getQueue(destination gomatrixserverlib.ServerName) *d
|
|||
|
||||
func (oqs *OutgoingQueues) clearQueues() {
|
||||
oqs.queuesMutex.Lock()
|
||||
queues := oqs.queues
|
||||
oqs.queuesMutex.Unlock()
|
||||
for _, q := range queues {
|
||||
defer oqs.queuesMutex.Unlock()
|
||||
for _, q := range oqs.queues {
|
||||
oqs.clearQueue(q)
|
||||
}
|
||||
time.AfterFunc(time.Minute, oqs.clearQueues)
|
||||
|
|
@ -191,7 +190,6 @@ func (oqs *OutgoingQueues) clearQueue(oq *destinationQueue) {
|
|||
case oq.backingOff.Load():
|
||||
return
|
||||
}
|
||||
|
||||
close(oq.notify)
|
||||
close(oq.interruptBackoff)
|
||||
delete(oqs.queues, oq.destination)
|
||||
|
|
|
|||
Loading…
Reference in a new issue