diff options
author | zelig <viktor.tron@gmail.com> | 2014-07-22 02:12:04 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-07-22 02:12:04 +0800 |
commit | 194c58858cd230a9a08b0eb14650720341a5580e (patch) | |
tree | 436dfde4f7d928be0fbc0267b4059cde39bac72e /ethminer/miner.go | |
parent | 67528cf9709519458ab5500cb7cf54664dd20167 (diff) | |
download | go-tangerine-194c58858cd230a9a08b0eb14650720341a5580e.tar go-tangerine-194c58858cd230a9a08b0eb14650720341a5580e.tar.gz go-tangerine-194c58858cd230a9a08b0eb14650720341a5580e.tar.bz2 go-tangerine-194c58858cd230a9a08b0eb14650720341a5580e.tar.lz go-tangerine-194c58858cd230a9a08b0eb14650720341a5580e.tar.xz go-tangerine-194c58858cd230a9a08b0eb14650720341a5580e.tar.zst go-tangerine-194c58858cd230a9a08b0eb14650720341a5580e.zip |
send zero event to miner.powQuitChan fixes miner hanging
Diffstat (limited to 'ethminer/miner.go')
-rw-r--r-- | ethminer/miner.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) } |