mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-15 04:26:37 +00:00
les/fetcher : fix requestTimer leak (#26514)
les/fetcher : fix requestTimer leak
This commit is contained in:
parent
97401b6c63
commit
4a3fb585dd
1 changed files with 1 additions and 0 deletions
|
|
@ -272,6 +272,7 @@ func (f *lightFetcher) mainloop() {
|
||||||
localHead = f.chain.CurrentHeader()
|
localHead = f.chain.CurrentHeader()
|
||||||
localTd = f.chain.GetTd(localHead.Hash(), localHead.Number.Uint64())
|
localTd = f.chain.GetTd(localHead.Hash(), localHead.Number.Uint64())
|
||||||
)
|
)
|
||||||
|
defer requestTimer.Stop()
|
||||||
sub := f.chain.SubscribeChainHeadEvent(headCh)
|
sub := f.chain.SubscribeChainHeadEvent(headCh)
|
||||||
defer sub.Unsubscribe()
|
defer sub.Unsubscribe()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue