mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
send zero event to miner.powQuitChan fixes miner hanging
This commit is contained in:
parent
67528cf970
commit
194c58858c
1 changed files with 3 additions and 3 deletions
|
|
@ -133,6 +133,9 @@ func (miner *Miner) listener() {
|
|||
|
||||
func (miner *Miner) Stop() {
|
||||
logger.Infoln("Stopping...")
|
||||
|
||||
miner.powQuitChan <- ethreact.Event{}
|
||||
|
||||
status := make(chan error)
|
||||
miner.quitChan <- status
|
||||
<-status
|
||||
|
|
@ -143,9 +146,6 @@ func (miner *Miner) Stop() {
|
|||
reactor.Unsubscribe("newBlock", miner.reactChan)
|
||||
reactor.Unsubscribe("newTx:pre", miner.reactChan)
|
||||
|
||||
close(miner.powQuitChan)
|
||||
close(miner.quitChan)
|
||||
|
||||
reactor.Post("miner:stop", miner)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue