diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 8bbda9904b..d48e5b26ef 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1284,7 +1284,6 @@ func (d *Downloader) processHeaders(origin uint64, td, ttd *big.Int, beaconMode gotHeaders = false // Wait for batches of headers to process timer = time.NewTimer(time.Second) ) - defer timer.Stop() for { diff --git a/ethstats/ethstats.go b/ethstats/ethstats.go index 0c334df748..c845db1164 100644 --- a/ethstats/ethstats.go +++ b/ethstats/ethstats.go @@ -544,7 +544,6 @@ func (s *Service) reportLatency(conn *connWrapper) error { return err } // Wait for the pong request to arrive back - timer := time.NewTimer(5 * time.Second) defer timer.Stop() diff --git a/p2p/simulations/mocker.go b/p2p/simulations/mocker.go index 3e6998e94f..5227e5f996 100644 --- a/p2p/simulations/mocker.go +++ b/p2p/simulations/mocker.go @@ -70,7 +70,6 @@ func startStop(net *Network, quit chan struct{}, nodeCount int) { tick = time.NewTicker(10 * time.Second) timer = time.NewTimer(3 * time.Second) ) - defer tick.Stop() defer timer.Stop()