Stop g_connman first before deleting it (#2734)

This commit is contained in:
Alexander Block 2019-03-01 16:30:30 +01:00
parent 9e233f391d
commit f868fbc787

View File

@ -256,6 +256,10 @@ void PrepareShutdown()
MapPort(false); MapPort(false);
UnregisterValidationInterface(peerLogic.get()); UnregisterValidationInterface(peerLogic.get());
peerLogic.reset(); peerLogic.reset();
if (g_connman) {
// make sure to stop all threads before g_connman is reset to nullptr as these threads might still be accessing it
g_connman->Stop();
}
g_connman.reset(); g_connman.reset();
if (!fLiteMode && !fRPCInWarmup) { if (!fLiteMode && !fRPCInWarmup) {