fix potential nil rtcp packets cause rtcpSendWorker exit (#504)

This commit is contained in:
cnderrauber
2022-03-11 15:40:24 +08:00
committed by GitHub
parent b6975bf7cd
commit a5fa54853f
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -377,7 +377,7 @@ func (w *WebRTCReceiver) DeleteDownTrack(peerID livekit.ParticipantID) {
}
func (w *WebRTCReceiver) sendRTCP(packets []rtcp.Packet) {
if w.closed.Load() {
if packets == nil || w.closed.Load() {
return
}