mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Fix data race in lookupMissingStateViaStateIDs
This commit is contained in:
parent
7ec70272d2
commit
f4345dafde
1 changed files with 3 additions and 4 deletions
|
@ -750,9 +750,8 @@ func (t *missingStateReq) lookupMissingStateViaStateIDs(ctx context.Context, roo
|
||||||
|
|
||||||
// Define what we'll do in order to fetch the missing event ID.
|
// Define what we'll do in order to fetch the missing event ID.
|
||||||
fetch := func(missingEventID string) {
|
fetch := func(missingEventID string) {
|
||||||
var h *gomatrixserverlib.Event
|
h, herr := t.lookupEvent(ctx, roomVersion, roomID, missingEventID, false)
|
||||||
h, err = t.lookupEvent(ctx, roomVersion, roomID, missingEventID, false)
|
switch herr.(type) {
|
||||||
switch err.(type) {
|
|
||||||
case verifySigError:
|
case verifySigError:
|
||||||
return
|
return
|
||||||
case nil:
|
case nil:
|
||||||
|
@ -761,7 +760,7 @@ func (t *missingStateReq) lookupMissingStateViaStateIDs(ctx context.Context, roo
|
||||||
util.GetLogger(ctx).WithFields(logrus.Fields{
|
util.GetLogger(ctx).WithFields(logrus.Fields{
|
||||||
"event_id": missingEventID,
|
"event_id": missingEventID,
|
||||||
"room_id": roomID,
|
"room_id": roomID,
|
||||||
}).Warn("Failed to fetch missing event")
|
}).WithError(herr).Warn("Failed to fetch missing event")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
haveEventsMutex.Lock()
|
haveEventsMutex.Lock()
|
||||||
|
|
Loading…
Reference in a new issue