From 16149aed5ac8cd49ec66c8587b8133d5677e7ab4 Mon Sep 17 00:00:00 2001 From: dan_s Date: Tue, 17 Feb 2026 21:19:49 -0600 Subject: [PATCH] wait for mining threads to fully exit before stopping --- src/miner.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/miner.cpp b/src/miner.cpp index acf678dcc..5f6abe654 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -1986,6 +1986,8 @@ void static BitcoinMiner() if (minerThreads != NULL) { minerThreads->interrupt_all(); + // Wait for all miner threads to fully terminate before destroying shared resources + minerThreads->join_all(); delete minerThreads; minerThreads = NULL;