mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-08 07:58:40 +00:00
eth/downloader: gracefully exit
This commit is contained in:
parent
4ed7a8a4a8
commit
5f4ac6757d
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue