Commit 389e30dd authored by wangoo's avatar wangoo

increase grNum before starting goroutine

parent b1e566ce
......@@ -495,10 +495,11 @@ func (s *session) run() {
return
}
s.grNum.Add(1)
if _, err := defaultTimerWheel.AddTimer(heartbeat, gxtime.TimerLoop, s.period, s); err != nil {
panic(fmt.Sprintf("failed to add session %s to defaultTimerWheel err:%v", s.Stat(), err))
}
s.grNum.Add(1)
// start read gr
go s.handlePackage()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment