aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorMatt Corallo <git@bluematt.me>2017-04-14 16:29:57 -0400
committerMatt Corallo <git@bluematt.me>2017-04-14 16:52:42 -0400
commitb2c9254205a59fa685d75470f73ad9397ecba708 (patch)
treeacf1dee24b7be3e252f0787aff512d786c1c2127 /src/net.cpp
parentf4db00f9a5482c91ae8a86c6e41e0ba61acf152b (diff)
downloadbitcoin-b2c9254205a59fa685d75470f73ad9397ecba708.tar.xz
Check interruptNet during dnsseed lookups
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp
index cf94faf854..27389d6e0c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1585,6 +1585,9 @@ void CConnman::ThreadDNSAddressSeed()
LogPrintf("Loading addresses from DNS seeds (could take a while)\n");
BOOST_FOREACH(const CDNSSeedData &seed, vSeeds) {
+ if (interruptNet) {
+ return;
+ }
if (HaveNameProxy()) {
AddOneShot(seed.host);
} else {
@@ -1602,6 +1605,9 @@ void CConnman::ThreadDNSAddressSeed()
found++;
}
}
+ if (interruptNet) {
+ return;
+ }
// TODO: The seed name resolve may fail, yielding an IP of [::], which results in
// addrman assigning the same source to results from different seeds.
// This should switch to a hard-coded stable dummy IP for each seed name, so that the