From 60561cdca26b84843ddb4d96158c6ca7d8c32ec1 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Mon, 18 May 2015 16:09:01 +0200 Subject: [PATCH] fixed issue when miner is not stopping af stop command --- miner/agent.go | 6 ++++++ 1 file changed, 6 insertions(+) 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 } }