mirror of
https://github.com/livekit/livekit.git
synced 2026-08-28 11:44:43 +00:00
fix panic on close channel (#495)
This commit is contained in:
@@ -1518,7 +1518,7 @@ func (p *ParticipantImpl) hasPendingMigratedTrack() bool {
|
||||
}
|
||||
|
||||
func (p *ParticipantImpl) onUpTrackManagerClose() {
|
||||
close(p.rtcpCh)
|
||||
p.rtcpCh <- nil
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
w.rtcpCh <- packets
|
||||
select {
|
||||
case w.rtcpCh <- packets:
|
||||
default:
|
||||
w.logger.Warnw("sendRTCP failed, rtcp channel full", nil)
|
||||
}
|
||||
|
||||
for _, p := range packets {
|
||||
switch pkt := p.(type) {
|
||||
|
||||
Reference in New Issue
Block a user