Merge pull request #6 from aginetwork7/fix/conn-nil

fix conn nil
This commit is contained in:
dashuang 2024-04-02 12:37:18 +08:00 committed by GitHub
commit ce7b5d8ee5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -373,6 +373,9 @@ func (client *RTSPClient) startStream() {
}
func (client *RTSPClient) request(method string, customHeaders map[string]string, uri string, one bool, nores bool) (err error) {
if client.conn == nil {
return
}
err = client.conn.SetDeadline(time.Now().Add(client.options.ReadWriteTimeout))
if err != nil {
return