Skip to content

Commit

Permalink
client: fix sending keepalives (bluenviron/mediamtx#1812)
Browse files Browse the repository at this point in the history
this fixes a regression introduced with #277
  • Loading branch information
aler9 committed May 20, 2023
1 parent 95bc8cd commit bb6785c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ func (c *Client) do(req *base.Request, skipResponse bool, allowFrames bool) (*ba
c.session = sx.Session

if sx.Timeout != nil && *sx.Timeout > 0 {
c.keepalivePeriod = time.Duration(((*sx.Timeout)*10)/8) * time.Second
c.keepalivePeriod = time.Duration(*sx.Timeout) * time.Second * 8 / 10
}
}

Expand Down

0 comments on commit bb6785c

Please sign in to comment.