From 7b39c71b79c06f419ea9a78efae8868627f09096 Mon Sep 17 00:00:00 2001 From: ucwong Date: Thu, 2 Apr 2020 09:21:06 +0000 Subject: [PATCH] eth/fetcher : add missing calls timer.Stop() --- 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 b6cab05deb..7690a53862 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