Fixed unclean DownTrack close when removed before bound. (#736)
* Fixed unclean DownTrack close when removed before bound. When a DownTrack is closed before it had a chance to be bound to a transceiver, we'd skip close and leave it hanging. This is unlikely in normal operations. However, it can be seen with permissions and subscription APIs. * remove remaining peerID references
This commit is contained in:
@@ -144,6 +144,7 @@ func (t *MediaTrackSubscriptions) AddSubscriber(sub types.LocalParticipant, wr *
|
||||
codecs,
|
||||
wr,
|
||||
t.params.BufferFactory,
|
||||
sub.Identity(),
|
||||
subscriberID,
|
||||
t.params.ReceiverConfig.PacketBufferSize,
|
||||
LoggerWithTrack(sub.GetLogger(), trackID),
|
||||
@@ -309,6 +310,10 @@ func (t *MediaTrackSubscriptions) RevokeDisallowedSubscribers(allowedSubscriberI
|
||||
}
|
||||
|
||||
if !found {
|
||||
t.params.Logger.Infow("revoking subscription",
|
||||
"subscriber", subTrack.SubscriberIdentity(),
|
||||
"subscriberID", subTrack.SubscriberID(),
|
||||
)
|
||||
go subTrack.DownTrack().Close()
|
||||
revokedSubscriberIdentities = append(revokedSubscriberIdentities, subTrack.SubscriberIdentity())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user