diff options
author | Bas van Kervel <basvankervel@gmail.com> | 2015-05-18 22:09:01 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2015-05-18 22:09:01 +0800 |
commit | 60561cdca26b84843ddb4d96158c6ca7d8c32ec1 (patch) | |
tree | 4224cc173d273990b3007586b4a5b73403593c99 | |
parent | 7778740315f322a9a31219090f180374a5620ec0 (diff) | |
download | dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar.gz dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar.bz2 dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar.lz dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar.xz dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar.zst dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.zip |
fixed issue when miner is not stopping af stop command
-rw-r--r-- | miner/agent.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/miner/agent.go b/miner/agent.go index b4c776c65..3ed3ba839 100644 --- a/miner/agent.go +++ b/miner/agent.go @@ -67,6 +67,12 @@ out: go self.mine(block, self.quitCurrentOp) self.mu.Unlock() case <-self.quit: + self.mu.Lock() + if self.quitCurrentOp != nil { + close(self.quitCurrentOp) + self.quitCurrentOp = nil + } + self.mu.Unlock() break out } } |