mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-21 05:43:09 -06:00
Unbuffered channel to block /send causing sytest to not race anymore
This commit is contained in:
parent
99885a4d7e
commit
44a41836f0
|
|
@ -110,10 +110,13 @@ func NewDeviceListUpdater(
|
|||
// Start the device list updater, which will try to refresh any stale device lists.
|
||||
func (u *DeviceListUpdater) Start() error {
|
||||
for i := 0; i < len(u.workerChans); i++ {
|
||||
// Allocate a small buffer per channel.
|
||||
// Allocate no buffer per channel.
|
||||
// If the buffer limit is reached, backpressure will cause the processing of EDUs
|
||||
// to stop (in this transaction) until key requests can be made.
|
||||
ch := make(chan gomatrixserverlib.ServerName, 10)
|
||||
// This is important for sytest as when the /send transaction 200 OKs it assumes that
|
||||
// keys have been fetched and will then issue requests to /keys/query which it expects
|
||||
// to be satisfied from the cache (which it won't be if we haven't processed it yet).
|
||||
ch := make(chan gomatrixserverlib.ServerName, 0)
|
||||
u.workerChans[i] = ch
|
||||
go u.worker(ch)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue