Skip to content

Commit

Permalink
Stop g_connman first before deleting it (#2734)
Browse files Browse the repository at this point in the history
  • Loading branch information
codablock authored and UdjinM6 committed Mar 1, 2019
1 parent 9eb0ca7 commit f971da8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f971da8

Please sign in to comment.