Fixes
This commit is contained in:
parent
f68abcdb54
commit
2410ed58a4
|
@ -55,9 +55,9 @@ 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(joinedRoomIDs))
|
||||||
for _, roomID := range joinedRoomIDs {
|
for _, roomID := range joinedRoomIDs {
|
||||||
go func() {
|
go func(roomID string) {
|
||||||
defer reqWaitGroup.Done()
|
defer reqWaitGroup.Done()
|
||||||
var jr *types.JoinResponse
|
var jr *types.JoinResponse
|
||||||
jr, err = p.getJoinResponseForCompleteSync(
|
jr, err = p.getJoinResponseForCompleteSync(
|
||||||
|
@ -71,7 +71,7 @@ func (p *PDUStreamProvider) CompleteSync(
|
||||||
defer reqMutex.Unlock()
|
defer reqMutex.Unlock()
|
||||||
req.Response.Rooms.Join[roomID] = *jr
|
req.Response.Rooms.Join[roomID] = *jr
|
||||||
req.Rooms[roomID] = gomatrixserverlib.Join
|
req.Rooms[roomID] = gomatrixserverlib.Join
|
||||||
}()
|
}(roomID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add peeked rooms.
|
// Add peeked rooms.
|
||||||
|
|
Loading…
Reference in a new issue