diff --git a/plugin/evm/gossiper.go b/plugin/evm/gossiper.go index bc19021ebf..19078caf9d 100644 --- a/plugin/evm/gossiper.go +++ b/plugin/evm/gossiper.go @@ -235,13 +235,17 @@ func (n *pushGossiper) queuePriorityRegossipTxs() types.Transactions { func (n *pushGossiper) awaitEthTxGossip() { n.shutdownWg.Add(1) go n.ctx.Log.RecoverAndPanic(func() { - defer n.shutdownWg.Done() - var ( gossipTicker = time.NewTicker(txsGossipInterval) regossipTicker = time.NewTicker(n.config.RegossipFrequency.Duration) priorityRegossipTicker = time.NewTicker(n.config.PriorityRegossipFrequency.Duration) ) + defer func() { + gossipTicker.Stop() + regossipTicker.Stop() + priorityRegossipTicker.Stop() + n.shutdownWg.Done() + }() for { select {