Use a queue for add/remove subscribe operations. (#797)
* Use a queue for add/remove subscribe operations. If subscribe/unsubscribe happens very quickly, the subscription state gets mixed up as things are keyed off of subscriberID. Use a queue of subscribe operations and process it serially. * set up callback for down track added * move the queue on unexpected type * move the queue if removeSubscirber does not have a subscribed track
This commit is contained in:
@@ -124,7 +124,7 @@ func (u *UpTrackManager) AddSubscriber(sub types.LocalParticipant, params types.
|
||||
for _, track := range tracks {
|
||||
trackIDs = append(trackIDs, track.ID())
|
||||
}
|
||||
u.params.Logger.Debugw("subscribing new participant to tracks",
|
||||
u.params.Logger.Debugw("subscribing participant to tracks",
|
||||
"subscriber", sub.Identity(),
|
||||
"subscriberID", sub.ID(),
|
||||
"trackIDs", trackIDs)
|
||||
|
||||
Reference in New Issue
Block a user