diff --git a/eth/downloader/downloader.go b/eth/downloader/downloader.go index e56321e58f..9a805396c4 100644 --- a/eth/downloader/downloader.go +++ b/eth/downloader/downloader.go @@ -663,8 +663,11 @@ func (d *Downloader) spawnSync(fetchers []func() error) error { // it has processed the queue. d.queue.Close() } - if err = <-errc; err != nil && err != errCanceled { - break + if got := <-errc; got != nil { + err = got + if got != errCanceled { + break // receive a meaningful error, bubble it up + } } } d.queue.Close()