Fix response with empty producer

This commit is contained in:
Alexey Khit
2022-08-22 09:06:40 +03:00
parent 67522dbb19
commit f36851f83a
7 changed files with 34 additions and 13 deletions
+1
View File
@@ -108,6 +108,7 @@ func offerHandler(ctx *api.Context, msg *streamer.Message) {
// 2. AddConsumer, so we get new tracks
if err = stream.AddConsumer(conn); err != nil {
log.Warn().Err(err).Msg("[api.webrtc] add consumer")
_ = conn.Conn.Close()
ctx.Error(err)
return
}