diff --git a/eth/downloader/api.go b/eth/downloader/api.go index 7a2c028753..6033e44474 100644 --- a/eth/downloader/api.go +++ b/eth/downloader/api.go @@ -104,6 +104,9 @@ func (api *DownloaderAPI) eventLoop() { if ev.Type == SyncStarted { started = true } + case <-sub.Err(): + // The downloader is terminated or other internal error occurs + return case <-checkTimer.C: if !started { checkTimer.Reset(checkInterval)