Browse Source

Check interruptNet during dnsseed lookups

0.15
Matt Corallo 8 years ago
parent
commit
b2c9254205
  1. 6
      src/net.cpp

6
src/net.cpp

@ -1585,6 +1585,9 @@ void CConnman::ThreadDNSAddressSeed() @@ -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() @@ -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

Loading…
Cancel
Save