mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 11:24:44 -07:00
using clearTimer(&c.ping.tmr) for cleanup
Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
committed by
Matthias Hanel
parent
f7a772f097
commit
da4430fc8d
@@ -2185,10 +2185,7 @@ func (s *Server) leafNodeResumeConnectProcess(c *client) {
|
||||
c.mu.Unlock()
|
||||
return
|
||||
}
|
||||
if !c.ping.tmr.Stop() {
|
||||
<-c.ping.tmr.C
|
||||
c.ping.tmr = nil
|
||||
}
|
||||
clearTimer(&c.ping.tmr)
|
||||
closed := c.isClosed()
|
||||
c.mu.Unlock()
|
||||
if !closed {
|
||||
@@ -2223,10 +2220,7 @@ func (s *Server) leafNodeFinishConnectProcess(c *client) {
|
||||
// Capture account before releasing lock
|
||||
acc := c.acc
|
||||
// cancel connectProcessTimeout
|
||||
if !c.ping.tmr.Stop() {
|
||||
<-c.ping.tmr.C
|
||||
c.ping.tmr = nil
|
||||
}
|
||||
clearTimer(&c.ping.tmr)
|
||||
c.mu.Unlock()
|
||||
|
||||
// Make sure we register with the account here.
|
||||
|
||||
Reference in New Issue
Block a user