1
0
mirror of https://github.com/xmrig/xmrig.git synced 2025-12-08 00:15:04 -05:00

#1180 Fixed race condition in nonce reset.

This commit is contained in:
XMRig
2019-09-20 00:30:20 +07:00
committed by MoneroOcean
parent 81c1a80a71
commit e0640badc0
2 changed files with 5 additions and 7 deletions

View File

@@ -124,16 +124,15 @@ public:
{
active = true;
if (reset) {
Nonce::reset(job.index());
}
for (IBackend *backend : backends) {
backend->setJob(job);
}
if (reset) {
Nonce::reset(job.index());
}
else {
Nonce::touch();
}
if (enabled) {
Nonce::pause(false);;

View File

@@ -78,7 +78,6 @@ void xmrig::Nonce::reset(uint8_t index)
std::lock_guard<std::mutex> lock(mutex);
m_nonces[index] = 0;
touch();
}