mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-25 13:11:37 +00:00
De-race CompleteSync
(#2601)
The `err` was coming from outside of the goroutine and being written to by concurrent goroutines.
This commit is contained in:
parent
119cde3766
commit
e94ef84aab
@ -109,12 +109,11 @@ func (p *PDUStreamProvider) CompleteSync(
|
|||||||
p.queue(func() {
|
p.queue(func() {
|
||||||
defer reqWaitGroup.Done()
|
defer reqWaitGroup.Done()
|
||||||
|
|
||||||
var jr *types.JoinResponse
|
jr, jerr := p.getJoinResponseForCompleteSync(
|
||||||
jr, err = p.getJoinResponseForCompleteSync(
|
|
||||||
ctx, roomID, r, &stateFilter, &eventFilter, req.WantFullState, req.Device,
|
ctx, roomID, r, &stateFilter, &eventFilter, req.WantFullState, req.Device,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if jerr != nil {
|
||||||
req.Log.WithError(err).Error("p.getJoinResponseForCompleteSync failed")
|
req.Log.WithError(jerr).Error("p.getJoinResponseForCompleteSync failed")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user