From 401bf85a10f25c2b61981011b6561ab411f54713 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Mon, 22 Aug 2022 09:09:18 +0300 Subject: [PATCH] Update RTSP error output --- pkg/tcp/textproto.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/tcp/textproto.go b/pkg/tcp/textproto.go index 4e35ff9b..5afe7628 100644 --- a/pkg/tcp/textproto.go +++ b/pkg/tcp/textproto.go @@ -2,7 +2,6 @@ package tcp import ( "bufio" - "errors" "fmt" "io" "net/textproto" @@ -50,7 +49,7 @@ func ReadResponse(r *bufio.Reader) (*Response, error) { ss := strings.SplitN(line, " ", 3) if len(ss) != 3 { - return nil, errors.New("malformed response") + return nil, fmt.Errorf("malformed response: %s", line) } res := &Response{