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:
+2
-2
@@ -35,12 +35,12 @@ func PackDataTrackLabel(participantID livekit.ParticipantID, trackID livekit.Tra
|
||||
return string(participantID) + trackIdSeparator + string(trackID) + trackIdSeparator + label
|
||||
}
|
||||
|
||||
func UnpackDataTrackLabel(packed string) (peerID livekit.ParticipantID, trackID livekit.TrackID, label string) {
|
||||
func UnpackDataTrackLabel(packed string) (participantID livekit.ParticipantID, trackID livekit.TrackID, label string) {
|
||||
parts := strings.Split(packed, trackIdSeparator)
|
||||
if len(parts) != 3 {
|
||||
return "", livekit.TrackID(packed), ""
|
||||
}
|
||||
peerID = livekit.ParticipantID(parts[0])
|
||||
participantID = livekit.ParticipantID(parts[0])
|
||||
trackID = livekit.TrackID(parts[1])
|
||||
label = parts[2]
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user