aboutsummaryrefslogtreecommitdiffstats
path: root/miner/agent.go
diff options
context:
space:
mode:
Diffstat (limited to 'miner/agent.go')
-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
}
}