aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2015-05-18 22:09:01 +0800
committerBas van Kervel <basvankervel@gmail.com>2015-05-18 22:09:01 +0800
commit60561cdca26b84843ddb4d96158c6ca7d8c32ec1 (patch)
tree4224cc173d273990b3007586b4a5b73403593c99 /miner
parent7778740315f322a9a31219090f180374a5620ec0 (diff)
downloaddexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar.gz
dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.tar.zst
dexon-60561cdca26b84843ddb4d96158c6ca7d8c32ec1.zip
fixed issue when miner is not stopping af stop command
Diffstat (limited to 'miner')
-rw-r--r--miner/agent.go6
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
}
}