Skip to content

Commit

Permalink
pingTimeoutTimer初始化后先stop
Browse files Browse the repository at this point in the history
Signed-off-by: angwang <15606216810@163.com>
  • Loading branch information
angwangiot committed Nov 30, 2019
1 parent bc13b7b commit 3b754b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func keepalive(c *client) {
defer c.keepaliveTimer.Stop()

c.pingTimeoutTimer = timer.NewTimer(c.options.PingTimeout)
c.pingTimeoutTimer.Stop()
defer c.pingTimeoutTimer.Stop()

for {
Expand Down

0 comments on commit 3b754b9

Please sign in to comment.