Record dynacast requirement of a subscriber synchronously. (#834)
With rapid changes to subscription settings, use of a goroutine could end up processing dynacast needs for that subscriber in a different order. So, record the susbcription needs of a subscriber in the callback and process the data in a go routine.
This commit is contained in:
@@ -973,6 +973,7 @@ func (p *ParticipantImpl) UpdateSubscribedTrackSettings(trackID livekit.TrackID,
|
||||
|
||||
subTrack := p.subscribedTracks[trackID]
|
||||
if subTrack == nil {
|
||||
// will get set when subscribed track is added
|
||||
p.lock.Unlock()
|
||||
p.params.Logger.Infow("could not find subscribed track", "trackID", trackID)
|
||||
return nil
|
||||
@@ -1969,6 +1970,7 @@ func (p *ParticipantImpl) rtcpSendWorker() {
|
||||
// read from rtcpChan
|
||||
for pkts := range p.rtcpCh {
|
||||
if pkts == nil {
|
||||
p.params.Logger.Infow("exiting RTCP send worker")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user