aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorMatt Corallo <[email protected]>2017-04-14 16:29:57 -0400
committerJonas Schnelli <[email protected]>2017-05-31 10:52:56 +0200
commit0aee4a132b6d3be276503c517cb2b7f07d774bf6 (patch)
tree20b7e31d2e28606239458fe44dbfa5847cb8d57f /src/net.cpp
parentMinor fix in build documentation for FreeBSD 11 (diff)
downloaddiscoin-0aee4a132b6d3be276503c517cb2b7f07d774bf6.tar.xz
discoin-0aee4a132b6d3be276503c517cb2b7f07d774bf6.zip
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 5593f81ef..2fca99474 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1579,6 +1579,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 {
@@ -1596,6 +1599,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