eth/fetcher : add missing calls timer.Stop()

This commit is contained in:
ucwong 2020-04-02 09:21:06 +00:00
parent f15849cf00
commit 7b39c71b79

View file

@ -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