Process federated joins in background context (#1434)

* Return early from federated room join

* Synchronous perform-join as long as possible

* Don't allow multiple federated joins to the same room by the same user
This commit is contained in:
Neil Alexander 2020-09-22 11:05:45 +01:00 committed by GitHub
parent 45de9dc1c0
commit a7563ede3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 61 additions and 19 deletions

View file

@ -2,6 +2,7 @@ package internal
import (
"context"
"sync"
"time"
"github.com/matrix-org/dendrite/federationsender/api"
@ -23,6 +24,7 @@ type FederationSenderInternalAPI struct {
federation *gomatrixserverlib.FederationClient
keyRing *gomatrixserverlib.KeyRing
queues *queue.OutgoingQueues
joins sync.Map // joins currently in progress
}
func NewFederationSenderInternalAPI(