From 66ed58bfcc2658e2ef60521c04701fb8e0455bcb Mon Sep 17 00:00:00 2001
From: ucwong <ucwong@126.com>
Date: Thu, 2 Apr 2020 18:32:45 +0800
Subject: [PATCH] eth/fetcher: add missing timer.Stop calls (#20861)

---
 eth/fetcher/block_fetcher.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eth/fetcher/block_fetcher.go b/eth/fetcher/block_fetcher.go
index b6cab05de..7690a5386 100644
--- a/eth/fetcher/block_fetcher.go
+++ b/eth/fetcher/block_fetcher.go
@@ -302,6 +302,8 @@ func (f *BlockFetcher) loop() {
 	// Iterate the block fetching until a quit is requested
 	fetchTimer := time.NewTimer(0)
 	completeTimer := time.NewTimer(0)
+	defer fetchTimer.Stop()
+	defer completeTimer.Stop()
 
 	for {
 		// Clean up any expired block fetches
-- 
GitLab