client: reorder parameters

This commit is contained in:
aler9
2021-10-31 12:49:44 +01:00
committed by Alessandro Ros
parent 7ebbdbf093
commit a66a038a23
2 changed files with 10 additions and 21 deletions

View File

@@ -167,7 +167,7 @@ type ClientConn struct {
}
func newClientConn(c *Client, scheme string, host string) (*ClientConn, error) {
// connection
// RTSP parameters
if c.ReadTimeout == 0 {
c.ReadTimeout = 10 * time.Second
}
@@ -177,12 +177,9 @@ func newClientConn(c *Client, scheme string, host string) (*ClientConn, error) {
if c.TLSConfig == nil {
c.TLSConfig = &tls.Config{InsecureSkipVerify: true}
}
// reading / writing
if c.InitialUDPReadTimeout == 0 {
c.InitialUDPReadTimeout = 3 * time.Second
}
if c.ReadBufferCount == 0 {
c.ReadBufferCount = 1
}