From 7b6cc7bf6ac2aa4675b0ffcbbd631c791d7122c6 Mon Sep 17 00:00:00 2001 From: rlpeck <40871210+rlpeck@users.noreply.github.com> Date: Sun, 10 Jul 2022 19:43:14 -0700 Subject: [PATCH] Fix unreachable conditional (#656) --- pkg/sfu/receiver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sfu/receiver.go b/pkg/sfu/receiver.go index 62fe3f404..785f5111c 100644 --- a/pkg/sfu/receiver.go +++ b/pkg/sfu/receiver.go @@ -370,7 +370,7 @@ func (w *WebRTCReceiver) writeRTP(layer int) { for _, dt := range w.downTracks[layer].Load().([]*DownTrack) { if err = dt.WriteRTP(pkt, layer); err != nil { - if err == io.EOF && err == io.ErrClosedPipe { + if err == io.EOF || err == io.ErrClosedPipe { w.Lock() w.deleteDownTrack(layer, dt.id) w.Unlock()