mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 17:23:09 -06:00
Reduce CPU usage, fix unit tests
This commit is contained in:
parent
6582b639f0
commit
9fe6b01f94
|
|
@ -294,6 +294,8 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res
|
|||
results[task.event.EventID()] = gomatrixserverlib.PDUResult{
|
||||
Error: task.err.Error(),
|
||||
}
|
||||
} else {
|
||||
results[task.event.EventID()] = gomatrixserverlib.PDUResult{}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -309,6 +311,7 @@ func (t *inputWorker) run() {
|
|||
}
|
||||
defer t.running.Store(false)
|
||||
for {
|
||||
<-t.input.wait()
|
||||
task, ok := t.input.pop()
|
||||
if !ok {
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue