mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
net: stop both net/net_processing before destroying them
This should avoid either attempting to use an invalid reference/pointer to the other.
This commit is contained in:
@@ -194,9 +194,13 @@ void Shutdown()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
MapPort(false);
|
MapPort(false);
|
||||||
|
|
||||||
|
// Because these depend on each-other, we make sure that neither can be
|
||||||
|
// using the other before destroying them.
|
||||||
UnregisterValidationInterface(peerLogic.get());
|
UnregisterValidationInterface(peerLogic.get());
|
||||||
g_connman.reset();
|
g_connman->Stop();
|
||||||
peerLogic.reset();
|
peerLogic.reset();
|
||||||
|
g_connman.reset();
|
||||||
|
|
||||||
StopTorControl();
|
StopTorControl();
|
||||||
if (fDumpMempoolLater && gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
|
if (fDumpMempoolLater && gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user