From 194c58858cd230a9a08b0eb14650720341a5580e Mon Sep 17 00:00:00 2001 From: zelig Date: Mon, 21 Jul 2014 19:12:04 +0100 Subject: send zero event to miner.powQuitChan fixes miner hanging --- ethminer/miner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ethminer') diff --git a/ethminer/miner.go b/ethminer/miner.go index 8659d2889..e51b37e05 100644 --- a/ethminer/miner.go +++ b/ethminer/miner.go @@ -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) } -- cgit v1.2.3