Commit 57d43503 authored by Khanh Hoa's avatar Khanh Hoa Committed by GitHub

refactor(op-service, op-node): add missing stop ticker (#9474)

* refactor: add missing stop ticker

* chore: rollback
parent 32596f3e
...@@ -111,6 +111,7 @@ func (s *peerApplicationScorer) start() { ...@@ -111,6 +111,7 @@ func (s *peerApplicationScorer) start() {
go func() { go func() {
defer s.done.Done() defer s.done.Done()
ticker := s.clock.NewTicker(s.params.DecayInterval) ticker := s.clock.NewTicker(s.params.DecayInterval)
defer ticker.Stop()
for { for {
select { select {
case <-s.ctx.Done(): case <-s.ctx.Done():
......
...@@ -55,6 +55,7 @@ func (c *AdvancingClock) Stop() { ...@@ -55,6 +55,7 @@ func (c *AdvancingClock) Stop() {
// Already stopped // Already stopped
return return
} }
c.ticker.Stop()
c.quit <- nil c.quit <- nil
} }
......
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