diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index 017d25704..143d8bde7 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -1263,9 +1263,11 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error { case ch <- false: case <-d.cancelCh: } - return nil } } + if !cont { + return nil + } // Queue not yet full, fetch the next batch from += uint64(len(headers)) getHeaders(from)