From 5c1266cba2bb94fb94c7602ef5f19205400ebf12 Mon Sep 17 00:00:00 2001 From: Cyrix126 Date: Wed, 12 Jun 2024 15:00:42 +0200 Subject: [PATCH] fix: empty values of XMRig when stopped --- src/helper/xmrig.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/helper/xmrig.rs b/src/helper/xmrig.rs index 0533104..48688c8 100644 --- a/src/helper/xmrig.rs +++ b/src/helper/xmrig.rs @@ -122,6 +122,10 @@ impl Helper { info!("XMRig | Attempting to stop..."); lock2!(helper, xmrig).signal = ProcessSignal::Stop; lock2!(helper, xmrig).state = ProcessState::Middle; + let gui_api = Arc::clone(&lock!(helper).gui_api_xmrig); + let pub_api = Arc::clone(&lock!(helper).pub_api_xmrig); + *lock!(pub_api) = PubXmrigApi::new(); + *lock!(gui_api) = PubXmrigApi::new(); } #[cold]