mirror of
https://github.com/aler9/gortsplib
synced 2025-12-24 13:38:08 +08:00
server: fix timeout when reading with Media Foundation (bluenviron/mediamtx#5090) (#932)
This commit is contained in:
@@ -1229,7 +1229,10 @@ func (c *Client) do(req *base.Request, skipResponse bool) (*base.Response, error
|
||||
c.session = sx.Session
|
||||
|
||||
if sx.Timeout != nil && *sx.Timeout > 0 {
|
||||
c.keepAlivePeriod = time.Duration(*sx.Timeout) * time.Second * 8 / 10
|
||||
c.keepAlivePeriod = max(
|
||||
(time.Duration(*sx.Timeout)*time.Second)-5*time.Second,
|
||||
1*time.Second,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user