From b01ba2e1167e3cc07bfca1186f0e5d5320e54b48 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:41:00 +0200 Subject: [PATCH] JSON RPC API: stop polling when shutting down --- src/merge_mining_client_json_rpc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/merge_mining_client_json_rpc.cpp b/src/merge_mining_client_json_rpc.cpp index b1d4017..5ba39bc 100644 --- a/src/merge_mining_client_json_rpc.cpp +++ b/src/merge_mining_client_json_rpc.cpp @@ -100,6 +100,10 @@ MergeMiningClientJSON_RPC::~MergeMiningClientJSON_RPC() void MergeMiningClientJSON_RPC::on_timer() { + if (m_pool->stopped()) { + return; + } + MinerData data = m_pool->miner_data(); merge_mining_get_aux_block(data.height, data.prev_id, m_auxWallet); }