Miner: fix state machine
Remove unexpected resume due to disconnect during dataset init
This commit is contained in:
parent
7bdeba4d08
commit
3ee0cd8c51
@ -134,8 +134,6 @@ public:
|
|||||||
Nonce::pause(true);
|
Nonce::pause(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
active = true;
|
|
||||||
|
|
||||||
if (reset) {
|
if (reset) {
|
||||||
Nonce::reset(job.index());
|
Nonce::reset(job.index());
|
||||||
}
|
}
|
||||||
@ -146,7 +144,7 @@ public:
|
|||||||
|
|
||||||
Nonce::touch();
|
Nonce::touch();
|
||||||
|
|
||||||
if (enabled) {
|
if (active && enabled) {
|
||||||
Nonce::pause(false);
|
Nonce::pause(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -536,6 +534,8 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
|
|||||||
|
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
|
||||||
|
d_ptr->active = true;
|
||||||
|
|
||||||
if (ready) {
|
if (ready) {
|
||||||
d_ptr->handleJobChange();
|
d_ptr->handleJobChange();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user