mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 17:22:59 +00:00
don't remove tracks if client is closed
This commit is contained in:
1 parent
04dcdc3772
commit
64b427a388
1 file changed
+3
@@ -78,6 +78,9 @@ func (t *Track) AddSubscriber(participant *Participant) error {
|
||||
delete(t.forwarders, participant.ID())
|
||||
t.lock.Unlock()
|
||||
|
||||
if participant.peerConn.ConnectionState() == webrtc.PeerConnectionStateClosed {
|
||||
return
|
||||
}
|
||||
if err := participant.peerConn.RemoveTrack(rtpSender); err != nil {
|
||||
logger.GetLogger().Warnw("could not remove mediaTrack from forwarder",
|
||||
"participant", participant.ID(),
|
||||
|
||||
Reference in new issue
Block a user