From 4a3fb585dd1a9e5f62057b17dd62cabc01dfadc0 Mon Sep 17 00:00:00 2001 From: ucwong Date: Wed, 18 Jan 2023 02:46:32 -0600 Subject: [PATCH] les/fetcher : fix requestTimer leak (#26514) les/fetcher : fix requestTimer leak --- les/fetcher.go | 1 + 1 file changed, 1 insertion(+) diff --git a/les/fetcher.go b/les/fetcher.go index ef37d80cd..c7a55b193 100644 --- a/les/fetcher.go +++ b/les/fetcher.go @@ -272,6 +272,7 @@ func (f *lightFetcher) mainloop() { localHead = f.chain.CurrentHeader() localTd = f.chain.GetTd(localHead.Hash(), localHead.Number.Uint64()) ) + defer requestTimer.Stop() sub := f.chain.SubscribeChainHeadEvent(headCh) defer sub.Unsubscribe()