From ecee2af05cf9c227f35ddc1ba89dafc0c42f5f3b Mon Sep 17 00:00:00 2001 From: Alessandro Ros Date: Mon, 30 Oct 2023 19:53:03 +0100 Subject: [PATCH] webrtc: fix crash in case of errors during PATCH (#2609) (#2613) --- internal/core/webrtc_http_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/webrtc_http_server.go b/internal/core/webrtc_http_server.go index d3a9d8b4..30639e82 100644 --- a/internal/core/webrtc_http_server.go +++ b/internal/core/webrtc_http_server.go @@ -254,7 +254,7 @@ func (s *webRTCHTTPServer) onWHIPPatch(ctx *gin.Context, rawSecret string) { candidates: candidates, }) if res.err != nil { - webrtcWriteError(ctx, http.StatusInternalServerError, err) + webrtcWriteError(ctx, http.StatusInternalServerError, res.err) return }