Explorar o código

miner/worker: add missing timer.Stop call (#20857)

ucwong %!s(int64=5) %!d(string=hai) anos
pai
achega
ad4b60efdd
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      miner/worker.go

+ 1 - 0
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.