0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-14 21:03:49 +01:00

Only create a new destinationQueue if we don't have one (#2620)

This commit is contained in:
Till 2022-08-05 07:20:34 +02:00 committed by GitHub
parent a2bed259dd
commit 9a655cb5e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -158,7 +158,7 @@ func (oqs *OutgoingQueues) getQueue(destination gomatrixserverlib.ServerName) *d
oqs.queuesMutex.Lock() oqs.queuesMutex.Lock()
defer oqs.queuesMutex.Unlock() defer oqs.queuesMutex.Unlock()
oq, ok := oqs.queues[destination] oq, ok := oqs.queues[destination]
if !ok || oq != nil { if !ok || oq == nil {
destinationQueueTotal.Inc() destinationQueueTotal.Inc()
oq = &destinationQueue{ oq = &destinationQueue{
queues: oqs, queues: oqs,