Check blacklist properly

This commit is contained in:
Neil Alexander 2021-02-17 15:01:07 +00:00
parent db78ec73e8
commit 7cf4daa210
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -148,13 +148,13 @@ type queuedEDU struct {
}
func (oqs *OutgoingQueues) getQueue(destination gomatrixserverlib.ServerName) *destinationQueue {
if _, blacklisted := oqs.statistics.ForServer(destination).BackoffInfo(); blacklisted {
if oqs.statistics.ForServer(destination).Blacklisted() {
return nil
}
oqs.queuesMutex.Lock()
defer oqs.queuesMutex.Unlock()
oq := oqs.queues[destination]
if oq == nil {
oq, ok := oqs.queues[destination]
if !ok {
destinationQueueTotal.Inc()
oq = &destinationQueue{
queues: oqs,