Skip to content

Commit

Permalink
eth/downloader: fix error aggregator (ethereum#27217)
Browse files Browse the repository at this point in the history
  • Loading branch information
rjl493456442 authored May 5, 2023
1 parent ffda2c6 commit 79a57d4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions eth/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 79a57d4

Please sign in to comment.