Stop g_connman first before deleting it (#2734)

This commit is contained in:
Alexander Block 2019-03-01 16:30:30 +01:00 committed by UdjinM6
parent 9eb0ca7040
commit f971da8318

View File

@ -255,6 +255,10 @@ void PrepareShutdown()
MapPort(false);
UnregisterValidationInterface(peerLogic.get());
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();
if (!fLiteMode && !fRPCInWarmup) {