mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 09:13:09 -06:00
Check blacklist properly
This commit is contained in:
parent
db78ec73e8
commit
7cf4daa210
|
|
@ -148,13 +148,13 @@ type queuedEDU struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (oqs *OutgoingQueues) getQueue(destination gomatrixserverlib.ServerName) *destinationQueue {
|
func (oqs *OutgoingQueues) getQueue(destination gomatrixserverlib.ServerName) *destinationQueue {
|
||||||
if _, blacklisted := oqs.statistics.ForServer(destination).BackoffInfo(); blacklisted {
|
if oqs.statistics.ForServer(destination).Blacklisted() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
oqs.queuesMutex.Lock()
|
oqs.queuesMutex.Lock()
|
||||||
defer oqs.queuesMutex.Unlock()
|
defer oqs.queuesMutex.Unlock()
|
||||||
oq := oqs.queues[destination]
|
oq, ok := oqs.queues[destination]
|
||||||
if oq == nil {
|
if !ok {
|
||||||
destinationQueueTotal.Inc()
|
destinationQueueTotal.Inc()
|
||||||
oq = &destinationQueue{
|
oq = &destinationQueue{
|
||||||
queues: oqs,
|
queues: oqs,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue