[Pkg-bitcoin-commits] [bitcoin] 92/126: net: stop both net/net_processing before destroying them
Jonas Smedegaard
dr at jones.dk
Mon Nov 13 20:02:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.15.1_dfsg-1
in repository bitcoin.
commit 0a5477c7e30667f4dc864b69975a8da5f63ca71e
Author: Cory Fields <cory-nospam- at coryfields.com>
Date: Thu Sep 7 14:26:20 2017 -0400
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: 2525b972af6645ca239ac1078cffb132b402bfbb
---
src/init.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/init.cpp b/src/init.cpp
index 6225066..798c24a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -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)) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/bitcoin.git
More information about the Pkg-bitcoin-commits
mailing list