Update pion/ice to stop gather first on close (#4123)

* Update pion/ice to stop gather first on close

* fix data race in test
This commit is contained in:
Raja Subramanian
2025-12-04 12:22:52 +05:30
committed by GitHub
parent 7954748d7a
commit f8706cd470
3 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -711,7 +711,10 @@ func (c *RTCClient) SubscribedDataTracks() map[livekit.ParticipantID]map[uint16]
c.lock.Lock()
defer c.lock.Unlock()
tracks := make(map[livekit.ParticipantID]map[uint16]*DataTrackRemote, len(c.subscribedDataTracks))
maps.Copy(tracks, c.subscribedDataTracks)
for publisherID, sts := range c.subscribedDataTracks {
tracks[publisherID] = make(map[uint16]*DataTrackRemote)
maps.Copy(tracks[publisherID], sts)
}
return tracks
}