mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 14:52:46 +08:00
client: cleanup
This commit is contained in:
@@ -523,8 +523,6 @@ func (c *Client) run() {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
c.checkStreamTimer = time.NewTimer(clientCheckStreamPeriod)
|
||||
} else {
|
||||
inTimeout := func() bool {
|
||||
now := time.Now()
|
||||
@@ -544,8 +542,6 @@ func (c *Client) run() {
|
||||
if inTimeout {
|
||||
return liberrors.ErrClientUDPTimeout{}
|
||||
}
|
||||
|
||||
c.checkStreamTimer = time.NewTimer(clientCheckStreamPeriod)
|
||||
}
|
||||
} else { // TCP
|
||||
inTimeout := func() bool {
|
||||
@@ -556,10 +552,10 @@ func (c *Client) run() {
|
||||
if inTimeout {
|
||||
return liberrors.ErrClientTCPTimeout{}
|
||||
}
|
||||
|
||||
c.checkStreamTimer = time.NewTimer(clientCheckStreamPeriod)
|
||||
}
|
||||
|
||||
c.checkStreamTimer = time.NewTimer(clientCheckStreamPeriod)
|
||||
|
||||
case <-c.keepaliveTimer.C:
|
||||
_, err := c.do(&base.Request{
|
||||
Method: func() base.Method {
|
||||
|
Reference in New Issue
Block a user