Fixes
This commit is contained in:
parent
9b6e807f82
commit
f68abcdb54
|
@ -2,6 +2,7 @@ package streams
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"sync"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/syncapi/types"
|
"github.com/matrix-org/dendrite/syncapi/types"
|
||||||
userapi "github.com/matrix-org/dendrite/userapi/api"
|
userapi "github.com/matrix-org/dendrite/userapi/api"
|
||||||
|
@ -54,7 +55,7 @@ func (p *PDUStreamProvider) CompleteSync(
|
||||||
// Build up a /sync response. Add joined rooms.
|
// Build up a /sync response. Add joined rooms.
|
||||||
var reqMutex sync.Mutex
|
var reqMutex sync.Mutex
|
||||||
var reqWaitGroup sync.WaitGroup
|
var reqWaitGroup sync.WaitGroup
|
||||||
reqWaitGroup.add(len(joinedRooms))
|
reqWaitGroup.Add(len(joinedRooms))
|
||||||
for _, roomID := range joinedRoomIDs {
|
for _, roomID := range joinedRoomIDs {
|
||||||
go func() {
|
go func() {
|
||||||
defer reqWaitGroup.Done()
|
defer reqWaitGroup.Done()
|
||||||
|
@ -64,7 +65,7 @@ func (p *PDUStreamProvider) CompleteSync(
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
req.Log.WithError(err).Error("p.getJoinResponseForCompleteSync failed")
|
req.Log.WithError(err).Error("p.getJoinResponseForCompleteSync failed")
|
||||||
return from
|
return //from
|
||||||
}
|
}
|
||||||
reqMutex.Lock()
|
reqMutex.Lock()
|
||||||
defer reqMutex.Unlock()
|
defer reqMutex.Unlock()
|
||||||
|
|
Loading…
Reference in a new issue