We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c00d98 commit fdb0586Copy full SHA for fdb0586
src/llmq/quorums.cpp
@@ -44,7 +44,9 @@ CQuorum::~CQuorum()
44
{
45
// most likely the thread is already done
46
stopCachePopulatorThread = true;
47
- if (cachePopulatorThread.joinable()) {
+ // watch out to not join the thread when we're called from inside the thread, which might happen on shutdown. This
48
+ // is because on shutdown the thread is the last owner of the shared CQuorum instance and thus the destroyer of it.
49
+ if (cachePopulatorThread.joinable() && cachePopulatorThread.get_id() != std::this_thread::get_id()) {
50
cachePopulatorThread.join();
51
}
52
0 commit comments