Prevent track subscriptions/adding receivers after close (#924)
* Prevent track subscriptions/adding receivers after close With subscribe/unsubscribe queuing, a subscribe may be attempted after a call to `RemoveAllSubscribers`. So, renaming `RemoveAllSubscribers` to `InitiateClose` and maintaining state that track is in the process of closing. * Mime specific remove * Remove unused error * do not add receiver when closing
This commit is contained in:
@@ -225,7 +225,6 @@ func (t *MediaTrack) AddReceiver(receiver *webrtc.RTPReceiver, track *webrtc.Tra
|
||||
)
|
||||
newWR.SetRTCPCh(t.params.RTCPChan)
|
||||
newWR.OnCloseHandler(func() {
|
||||
t.RemoveAllSubscribers(false)
|
||||
t.MediaTrackReceiver.ClearReceiver(mime)
|
||||
if t.MediaTrackReceiver.TryClose() {
|
||||
if t.dynacastManager != nil {
|
||||
|
||||
Reference in New Issue
Block a user