We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67aebbf commit 0f832e3Copy full SHA for 0f832e3
src/init.cpp
@@ -237,8 +237,6 @@ void PrepareShutdown()
237
// using the other before destroying them.
238
if (peerLogic) UnregisterValidationInterface(peerLogic.get());
239
if (g_connman) g_connman->Stop();
240
- peerLogic.reset();
241
- g_connman.reset();
242
243
StopTorControl();
244
@@ -247,6 +245,11 @@ void PrepareShutdown()
247
245
threadGroup.interrupt_all();
248
246
threadGroup.join_all();
249
+ // After the threads that potentially access these pointers have been stopped,
+ // destruct and reset all to nullptr.
250
+ peerLogic.reset();
251
+ g_connman.reset();
252
+
253
DumpMasternodes();
254
DumpBudgets(g_budgetman);
255
DumpMasternodePayments();
0 commit comments