mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-20 21:33:19 -06:00
Don't block if there are PDUs waiting
This commit is contained in:
parent
5082179ce3
commit
51dba37d7a
|
|
@ -184,6 +184,7 @@ func (oq *destinationQueue) backgroundSend() {
|
|||
|
||||
// Wait either for incoming events, or until we hit an
|
||||
// idle timeout.
|
||||
if len(oq.pendingPDUs) == 0 {
|
||||
select {
|
||||
case <-oq.incomingPDUs:
|
||||
// There are new PDUs waiting in the database.
|
||||
|
|
@ -223,6 +224,7 @@ func (oq *destinationQueue) backgroundSend() {
|
|||
// get an event.
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// If we are backing off this server then wait for the
|
||||
// backoff duration to complete first, or until explicitly
|
||||
|
|
|
|||
Loading…
Reference in a new issue