mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-28 19:06:14 +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.
Github-Pull: #10756
Rebased-From: 2525b972af
This commit is contained in:
@@ -193,9 +193,13 @@ void Shutdown()
|
||||
}
|
||||
#endif
|
||||
MapPort(false);
|
||||
|
||||
// Because these depend on each-other, we make sure that neither can be
|
||||
// using the other before destroying them.
|
||||
UnregisterValidationInterface(peerLogic.get());
|
||||
g_connman.reset();
|
||||
g_connman->Stop();
|
||||
peerLogic.reset();
|
||||
g_connman.reset();
|
||||
|
||||
StopTorControl();
|
||||
if (fDumpMempoolLater && gArgs.GetArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
|
||||
|
||||
Reference in New Issue
Block a user