fixed localrouter timeout, updated VideoGrant fields

This commit is contained in:
David Zhao
2021-01-24 12:52:40 -08:00
parent 18264e7a8b
commit c4fb1b3808
5 changed files with 22 additions and 5 deletions
+4
View File
@@ -157,6 +157,10 @@ func (t *MediaTrack) AddSubscriber(participant types.Participant) error {
"srcParticipant", t.participantId,
"destParticipant", participant.ID())
if err := participant.PeerConnection().RemoveTrack(sender); err != nil {
if err == webrtc.ErrConnectionClosed {
// participant closing, can skip removing downtracks
return
}
if _, ok := err.(*rtcerr.InvalidStateError); !ok {
logger.Warnw("could not remove remoteTrack from forwarder",
"participant", participant.ID(),
+1
View File
@@ -321,6 +321,7 @@ func (p *ParticipantImpl) Close() error {
return p.ctx.Err()
}
close(p.rtcpCh)
p.onICECandidate = nil
p.updateState(livekit.ParticipantInfo_DISCONNECTED)
p.responseSink.Close()
if p.onClose != nil {