mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-10-06 08:46:57 +08:00
Adds empty response on RTSP error
This commit is contained in:
@@ -2,6 +2,7 @@ package tcp
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"net/textproto"
|
"net/textproto"
|
||||||
@@ -46,6 +47,9 @@ func ReadResponse(r *bufio.Reader) (*Response, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if line == "" {
|
||||||
|
return nil, errors.New("empty response on RTSP request")
|
||||||
|
}
|
||||||
|
|
||||||
ss := strings.SplitN(line, " ", 3)
|
ss := strings.SplitN(line, " ", 3)
|
||||||
if len(ss) != 3 {
|
if len(ss) != 3 {
|
||||||
|
Reference in New Issue
Block a user