miner: properly check for mining operation on Register

This commit is contained in:
obscuren 2015-05-15 16:20:50 +02:00
parent 5cec1aad15
commit d3e84cc8b4
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ func (self *Miner) Stop() {
} }
func (self *Miner) Register(agent Agent) { func (self *Miner) Register(agent Agent) {
if atomic.LoadInt32(&self.mining) == 0 { if self.Mining() {
agent.Start() agent.Start()
} }