[release/1.3.4] eth/downloader: fix premature exit before notifying all part fetchers

(cherry picked from commit 64ee5763ee)
release/1.3.4
Péter Szilágyi 9 years ago committed by Jeffrey Wilcke
parent c2df9d356a
commit 2be2842758
  1. 4
      eth/downloader/downloader.go

@ -1230,9 +1230,11 @@ func (d *Downloader) fetchHeaders(p *peer, td *big.Int, from uint64) error {
case ch <- false: case ch <- false:
case <-d.cancelCh: case <-d.cancelCh:
} }
return nil
} }
} }
if !cont {
return nil
}
// Queue not yet full, fetch the next batch // Queue not yet full, fetch the next batch
from += uint64(len(headers)) from += uint64(len(headers))
getHeaders(from) getHeaders(from)

Loading…
Cancel
Save