Keep track of pending subscriber operations. (#814)
* Keep track of pending subscriber operations. This is required to determine if a receiver does not have any subscription. * correct spelling of queuing * lock around hasPermission
This commit is contained in:
@@ -93,11 +93,8 @@ func (t *MediaTrackSubscriptions) Restart() {
|
||||
}
|
||||
|
||||
func (t *MediaTrackSubscriptions) Stop() {
|
||||
t.stopMaxQualityTimer()
|
||||
}
|
||||
|
||||
func (t *MediaTrackSubscriptions) Close() {
|
||||
t.qualityNotifyOpQueue.Stop()
|
||||
t.stopMaxQualityTimer()
|
||||
}
|
||||
|
||||
func (t *MediaTrackSubscriptions) OnDownTrackCreated(f func(downTrack *sfu.DownTrack)) {
|
||||
@@ -702,6 +699,11 @@ func (t *MediaTrackSubscriptions) startMaxQualityTimer(force bool) {
|
||||
return
|
||||
}
|
||||
|
||||
if t.maxQualityTimer != nil {
|
||||
t.maxQualityTimer.Stop()
|
||||
t.maxQualityTimer = nil
|
||||
}
|
||||
|
||||
t.maxQualityTimer = time.AfterFunc(initialQualityUpdateWait, func() {
|
||||
t.stopMaxQualityTimer()
|
||||
t.UpdateQualityChange(force)
|
||||
|
||||
Reference in New Issue
Block a user