mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Clear more aggressively
This commit is contained in:
parent
995694af7a
commit
6a5826cba4
|
|
@ -174,19 +174,12 @@ func (oqs *OutgoingQueues) getQueue(destination gomatrixserverlib.ServerName) *d
|
||||||
func (oqs *OutgoingQueues) clearQueue(destination gomatrixserverlib.ServerName) {
|
func (oqs *OutgoingQueues) clearQueue(destination gomatrixserverlib.ServerName) {
|
||||||
oqs.queuesMutex.Lock()
|
oqs.queuesMutex.Lock()
|
||||||
defer oqs.queuesMutex.Unlock()
|
defer oqs.queuesMutex.Unlock()
|
||||||
oq, ok := oqs.queues[destination]
|
if oq, ok := oqs.queues[destination]; ok {
|
||||||
switch {
|
close(oq.notify)
|
||||||
case !ok:
|
close(oq.interruptBackoff)
|
||||||
return
|
delete(oqs.queues, destination)
|
||||||
case oq.running.Load():
|
destinationQueueTotal.Dec()
|
||||||
return
|
|
||||||
case oq.backingOff.Load():
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
close(oq.notify)
|
|
||||||
close(oq.interruptBackoff)
|
|
||||||
delete(oqs.queues, destination)
|
|
||||||
destinationQueueTotal.Dec()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type ErrorFederationDisabled struct {
|
type ErrorFederationDisabled struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue