aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-02-29 20:49:01 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-02-29 20:49:01 +0800
commitb1c1d09f839d208282342d9d772da57e97be82a9 (patch)
tree4c3227568bd6217340f04f3fb387b371a6f789af
parent4e7abcff3086fc3ed11299003c1f189901757801 (diff)
parent64ee5763eebe7e57e761be840f0b80ed7be93ca7 (diff)
downloaddexon-b1c1d09f839d208282342d9d772da57e97be82a9.tar
dexon-b1c1d09f839d208282342d9d772da57e97be82a9.tar.gz
dexon-b1c1d09f839d208282342d9d772da57e97be82a9.tar.bz2
dexon-b1c1d09f839d208282342d9d772da57e97be82a9.tar.lz
dexon-b1c1d09f839d208282342d9d772da57e97be82a9.tar.xz
dexon-b1c1d09f839d208282342d9d772da57e97be82a9.tar.zst
dexon-b1c1d09f839d208282342d9d772da57e97be82a9.zip
Merge pull request #2272 from karalabe/fix-premature-downloader-exit
eth/downloader: fix premature exit before notifying all part fetchers
-rw-r--r--eth/downloader/downloader.go4
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)