prevent double stats printing

This commit is contained in:
cryptonote-social 2020-06-27 10:17:12 -07:00
parent ee1265b1d9
commit b5ece2c852

View File

@ -371,10 +371,11 @@ func handlePoke(wasMining bool, job *client.MultiClientJob, excludeHrStart, excl
atomic.StoreInt32(&manualMinerToggle, 0)
}
} else if job == &PRINT_STATS_POKE {
atomic.StoreUint32(&stopper, 1) // halt mining to get accurate stats
wg.Wait()
printStats(wasMining)
return USE_CACHED // resumes mining
if !wasMining {
printStats(wasMining)
return HANDLED
}
return USE_CACHED // main loop will print out stats
} else {
// the job is not a recognized poke
return 0