mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 22:05:39 +00:00
Clone pending tracks to prevent concurrent update. (#3359)
This commit is contained in:
@@ -685,7 +685,7 @@ func (p *ParticipantImpl) ToProtoWithVersion() (*livekit.ParticipantInfo, utils.
|
||||
}
|
||||
|
||||
if !found {
|
||||
pi.Tracks = append(pi.Tracks, pti.trackInfos[0])
|
||||
pi.Tracks = append(pi.Tracks, utils.CloneProto(pti.trackInfos[0]))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2683,7 +2683,7 @@ func (p *ParticipantImpl) getPendingTrack(clientId string, kind livekit.TrackTyp
|
||||
return signalCid, nil, false, time.Time{}
|
||||
}
|
||||
|
||||
return signalCid, pendingInfo.trackInfos[0], pendingInfo.migrated, pendingInfo.createdAt
|
||||
return signalCid, utils.CloneProto(pendingInfo.trackInfos[0]), pendingInfo.migrated, pendingInfo.createdAt
|
||||
}
|
||||
|
||||
// setTrackID either generates a new TrackID for an AddTrackRequest
|
||||
|
||||
Reference in New Issue
Block a user