Commit 194c5885 authored by zelig's avatar zelig

send zero event to miner.powQuitChan fixes miner hanging

parent 67528cf9
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment