mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 23:52:46 +08:00
change ReadTimeout default value
This commit is contained in:
@@ -42,7 +42,7 @@ type ConnClientConf struct {
|
|||||||
Host string
|
Host string
|
||||||
|
|
||||||
// (optional) timeout for read requests.
|
// (optional) timeout for read requests.
|
||||||
// It defaults to 5 seconds
|
// It defaults to 10 seconds
|
||||||
ReadTimeout time.Duration
|
ReadTimeout time.Duration
|
||||||
|
|
||||||
// (optional) timeout for write requests.
|
// (optional) timeout for write requests.
|
||||||
@@ -71,7 +71,7 @@ type ConnClient struct {
|
|||||||
// NewConnClient allocates a ConnClient. See ConnClientConf for the options.
|
// NewConnClient allocates a ConnClient. See ConnClientConf for the options.
|
||||||
func NewConnClient(conf ConnClientConf) (*ConnClient, error) {
|
func NewConnClient(conf ConnClientConf) (*ConnClient, error) {
|
||||||
if conf.ReadTimeout == time.Duration(0) {
|
if conf.ReadTimeout == time.Duration(0) {
|
||||||
conf.ReadTimeout = 5 * time.Second
|
conf.ReadTimeout = 10 * time.Second
|
||||||
}
|
}
|
||||||
if conf.WriteTimeout == time.Duration(0) {
|
if conf.WriteTimeout == time.Duration(0) {
|
||||||
conf.WriteTimeout = 5 * time.Second
|
conf.WriteTimeout = 5 * time.Second
|
||||||
|
Reference in New Issue
Block a user