Browse Source

blockchain/v0: stop tickers on poolRoutine exit (#5860)

Fixes #5841.
pull/5893/head
Erik Grinaker 3 years ago
committed by Erik Grinaker
parent
commit
3185bb8b22
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      blockchain/v0/reactor.go

+ 5
- 0
blockchain/v0/reactor.go View File

@ -256,8 +256,13 @@ func (bcR *BlockchainReactor) Receive(chID byte, src p2p.Peer, msgBytes []byte)
func (bcR *BlockchainReactor) poolRoutine(stateSynced bool) {
trySyncTicker := time.NewTicker(trySyncIntervalMS * time.Millisecond)
defer trySyncTicker.Stop()
statusUpdateTicker := time.NewTicker(statusUpdateIntervalSeconds * time.Second)
defer statusUpdateTicker.Stop()
switchToConsensusTicker := time.NewTicker(switchToConsensusIntervalSeconds * time.Second)
defer switchToConsensusTicker.Stop()
blocksSynced := uint64(0)


Loading…
Cancel
Save