diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-02-29 20:22:28 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-02-29 20:22:28 +0800 |
commit | 64ee5763eebe7e57e761be840f0b80ed7be93ca7 (patch) | |
tree | 4c3227568bd6217340f04f3fb387b371a6f789af /eth | |
parent | 4e7abcff3086fc3ed11299003c1f189901757801 (diff) | |
download | dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.gz dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.tar.zst dexon-64ee5763eebe7e57e761be840f0b80ed7be93ca7.zip |
eth/downloader: fix premature exit before notifying all part fetchers
Diffstat (limited to 'eth')
-rw-r--r-- | eth/downloader/downloader.go | 4 |
1 files changed, 3 insertions, 1 deletions
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) |