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

View File

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