From ad4b60efdd5f1827872f110a6c8e39e60e45fb4f Mon Sep 17 00:00:00 2001 From: ucwong Date: Thu, 2 Apr 2020 16:40:38 +0800 Subject: [PATCH] miner/worker: add missing timer.Stop call (#20857) --- miner/worker.go | 1 + 1 file changed, 1 insertion(+) diff --git a/miner/worker.go b/miner/worker.go index d3cd10ed2..59a47a122 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -297,6 +297,7 @@ func (w *worker) newWorkLoop(recommit time.Duration) { ) timer := time.NewTimer(0) + defer timer.Stop() <-timer.C // discard the initial tick // commit aborts in-flight transaction execution with given signal and resubmits a new one.