From 26e6ecc3bc9eb70d4a0d90965435ab98630818db Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sat, 5 Dec 2020 00:32:01 +0100 Subject: [PATCH] Fix error handling on negotiation failure. --- rtpconn/webclient.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/rtpconn/webclient.go b/rtpconn/webclient.go index e90a9d5..f9010cf 100644 --- a/rtpconn/webclient.go +++ b/rtpconn/webclient.go @@ -788,15 +788,10 @@ func clientLoop(c *webClient, ws *websocket.Conn) error { if down != nil { err = negotiate(c, down, false, false) if err != nil { - log.Printf("Negotiate: %v", err) delDownConn(c, down.id) - err = failUpConnection( - c, down.id, - "negotiation failed", - ) - if err != nil { - return err - } + c.error(group.UserError( + "Negotiation failed", + )) continue } }