Skip to content

Commit

Permalink
Don't log EOF errors
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Aug 14, 2024
1 parent 59387c6 commit b6ccba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ func (c *Client) Unmute(track webrtc.TrackLocal) error {
rtcpBuf := make([]byte, receiveMTU)
for {
if _, _, rtcpErr := sender.Read(rtcpBuf); rtcpErr != nil {
c.log.Error("failed to read rtcp", slog.String("err", rtcpErr.Error()))
if !errors.Is(rtcpErr, io.EOF) {
c.log.Error("failed to read rtcp", slog.String("err", rtcpErr.Error()))
}
return
}
}
Expand Down

0 comments on commit b6ccba3

Please sign in to comment.