From dd4c67a6c41b265aa19eba719bc9dd4c2fe44e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Tue, 2 Feb 2021 19:36:11 +0100 Subject: [PATCH] registerTracks check for err. --- internal/webrtc/manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/webrtc/manager.go b/internal/webrtc/manager.go index 35eb2ff5..a37c4f28 100644 --- a/internal/webrtc/manager.go +++ b/internal/webrtc/manager.go @@ -106,7 +106,9 @@ func (manager *WebRTCManagerCtx) CreatePeer(session types.Session) (*webrtc.Sess } // Register video, audio & data tracks - manager.registerTracks(connection) + if err := manager.registerTracks(connection); err != nil { + return nil, err + } // Create Offer offer, err := connection.CreateOffer(nil)