Perform unsubscribe in parallel to avoid blocking (#1760)
* Perform unsubscribe in parallel to avoid blocking When unsubscribing from tracks, we flush a blank frame in order to prepare the transceivers for re-use. This process is blocking for ~200ms. If the unsubscribes are performed serially, it would prevent other subscribe operation from continuing. This PR parallelizes that operation, and ensures subsequent subscribe operations could reuse the existing transceivers. * also perform in parallel when uptrack close * fix a few log fields
This commit is contained in:
@@ -1686,7 +1686,7 @@ func (p *ParticipantImpl) addMigrateMutedTrack(cid string, ti *livekit.TrackInfo
|
||||
p.params.Logger.Debugw("add migrate muted track", "cid", cid, "track", ti.String())
|
||||
rtpReceiver := p.TransportManager.GetPublisherRTPReceiver(ti.Mid)
|
||||
if rtpReceiver == nil {
|
||||
p.params.Logger.Errorw("could not find receiver for migrated track", nil, "track", ti.Sid)
|
||||
p.params.Logger.Errorw("could not find receiver for migrated track", nil, "trackID", ti.Sid)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user