JSON RPC API: stop polling when shutting down

This commit is contained in:
SChernykh 2024-07-23 10:41:00 +02:00
parent 0bada79b6b
commit b01ba2e116

View file

@ -100,6 +100,10 @@ MergeMiningClientJSON_RPC::~MergeMiningClientJSON_RPC()
void MergeMiningClientJSON_RPC::on_timer() void MergeMiningClientJSON_RPC::on_timer()
{ {
if (m_pool->stopped()) {
return;
}
MinerData data = m_pool->miner_data(); MinerData data = m_pool->miner_data();
merge_mining_get_aux_block(data.height, data.prev_id, m_auxWallet); merge_mining_get_aux_block(data.height, data.prev_id, m_auxWallet);
} }