mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-11 01:11:37 +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 {
|
if ev.Type == SyncStarted {
|
||||||
started = true
|
started = true
|
||||||
}
|
}
|
||||||
|
case <-sub.Err():
|
||||||
|
// The downloader is terminated or other internal error occurs
|
||||||
|
return
|
||||||
case <-checkTimer.C:
|
case <-checkTimer.C:
|
||||||
if !started {
|
if !started {
|
||||||
checkTimer.Reset(checkInterval)
|
checkTimer.Reset(checkInterval)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue