mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
wait for a downloader done/failed event before breaking the miner update loop
This commit is contained in:
parent
8c25a83708
commit
88c7f2b249
1 changed files with 5 additions and 4 deletions
|
|
@ -62,11 +62,12 @@ func (self *Miner) update() {
|
|||
if shouldStart {
|
||||
self.Start(self.coinbase, self.threads)
|
||||
}
|
||||
|
||||
// unsubscribe. we're only interested in this event once
|
||||
events.Unsubscribe()
|
||||
// stop immediately and ignore all further pending events
|
||||
break
|
||||
}
|
||||
// unsubscribe. we're only interested in this event once
|
||||
events.Unsubscribe()
|
||||
// stop immediately and ignore all further pending events
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue