From abda47045d40cc3d48294677c5bcd737b93e03ca Mon Sep 17 00:00:00 2001 From: Alex X Date: Sun, 28 Apr 2024 07:15:36 +0300 Subject: [PATCH] Fixed possible nil pointer --- internal/webrtc/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/webrtc/client.go b/internal/webrtc/client.go index 29853932..18622dc4 100644 --- a/internal/webrtc/client.go +++ b/internal/webrtc/client.go @@ -191,10 +191,10 @@ func whepClient(url string) (core.Producer, error) { } req, err := http.NewRequest("POST", url, strings.NewReader(offer)) - req.Header.Set("Content-Type", MimeSDP) if err != nil { return nil, err } + req.Header.Set("Content-Type", MimeSDP) client := http.Client{Timeout: time.Second * 5000} defer client.CloseIdleConnections()