mirror of
https://github.com/livekit/livekit.git
synced 2026-04-28 14:55:48 +00:00
skip track updates when client has disconnected
This commit is contained in:
@@ -562,7 +562,8 @@ func (p *ParticipantImpl) handleTrackPublished(track types.PublishedTrack) {
|
||||
p.lock.Lock()
|
||||
delete(p.publishedTracks, track.ID())
|
||||
p.lock.Unlock()
|
||||
if p.onTrackUpdated != nil {
|
||||
// only send this when client is in a ready state
|
||||
if p.IsReady() && p.onTrackUpdated != nil {
|
||||
p.onTrackUpdated(p, track)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user