fix panic on close channel (#495)
This commit is contained in:
@@ -1518,7 +1518,7 @@ func (p *ParticipantImpl) hasPendingMigratedTrack() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *ParticipantImpl) onUpTrackManagerClose() {
|
func (p *ParticipantImpl) onUpTrackManagerClose() {
|
||||||
close(p.rtcpCh)
|
p.rtcpCh <- nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ParticipantImpl) getPendingTrack(clientId string, kind livekit.TrackType) (string, *livekit.TrackInfo) {
|
func (p *ParticipantImpl) getPendingTrack(clientId string, kind livekit.TrackType) (string, *livekit.TrackInfo) {
|
||||||
|
|||||||
+5
-1
@@ -380,7 +380,11 @@ func (w *WebRTCReceiver) sendRTCP(packets []rtcp.Packet) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
w.rtcpCh <- packets
|
select {
|
||||||
|
case w.rtcpCh <- packets:
|
||||||
|
default:
|
||||||
|
w.logger.Warnw("sendRTCP failed, rtcp channel full", nil)
|
||||||
|
}
|
||||||
|
|
||||||
for _, p := range packets {
|
for _, p := range packets {
|
||||||
switch pkt := p.(type) {
|
switch pkt := p.(type) {
|
||||||
|
|||||||
Reference in New Issue
Block a user