mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 17:23:09 -06:00
Fix waitgroup
This commit is contained in:
parent
6f129ca0ee
commit
d5e01df56f
|
|
@ -210,6 +210,8 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res
|
|||
//var resultsMutex sync.Mutex
|
||||
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(1) // for processEDUs
|
||||
|
||||
for _, pdu := range t.PDUs {
|
||||
pduCountTotal.WithLabelValues("total").Inc()
|
||||
var header struct {
|
||||
|
|
@ -276,8 +278,6 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res
|
|||
})
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
t.processEDUs(ctx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue