mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 17:23: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() {
|
func (oqs *OutgoingQueues) clearQueues() {
|
||||||
oqs.queuesMutex.Lock()
|
oqs.queuesMutex.Lock()
|
||||||
queues := oqs.queues
|
defer oqs.queuesMutex.Unlock()
|
||||||
oqs.queuesMutex.Unlock()
|
for _, q := range oqs.queues {
|
||||||
for _, q := range queues {
|
|
||||||
oqs.clearQueue(q)
|
oqs.clearQueue(q)
|
||||||
}
|
}
|
||||||
time.AfterFunc(time.Minute, oqs.clearQueues)
|
time.AfterFunc(time.Minute, oqs.clearQueues)
|
||||||
|
|
@ -191,7 +190,6 @@ func (oqs *OutgoingQueues) clearQueue(oq *destinationQueue) {
|
||||||
case oq.backingOff.Load():
|
case oq.backingOff.Load():
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
close(oq.notify)
|
close(oq.notify)
|
||||||
close(oq.interruptBackoff)
|
close(oq.interruptBackoff)
|
||||||
delete(oqs.queues, oq.destination)
|
delete(oqs.queues, oq.destination)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue