Skip to content

Commit

Permalink
Check interruptNet during dnsseed lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBlueMatt authored and jonasschnelli committed May 31, 2017
1 parent 44a17f2 commit 0aee4a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/net.cpp
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit 0aee4a1

Please sign in to comment.