mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Check interruptNet during dnsseed lookups
This commit is contained in:
parent
f4db00f9a5
commit
b2c9254205
1 changed files with 6 additions and 0 deletions
|
@ -1585,6 +1585,9 @@ void CConnman::ThreadDNSAddressSeed()
|
||||||
LogPrintf("Loading addresses from DNS seeds (could take a while)\n");
|
LogPrintf("Loading addresses from DNS seeds (could take a while)\n");
|
||||||
|
|
||||||
BOOST_FOREACH(const CDNSSeedData &seed, vSeeds) {
|
BOOST_FOREACH(const CDNSSeedData &seed, vSeeds) {
|
||||||
|
if (interruptNet) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (HaveNameProxy()) {
|
if (HaveNameProxy()) {
|
||||||
AddOneShot(seed.host);
|
AddOneShot(seed.host);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1602,6 +1605,9 @@ void CConnman::ThreadDNSAddressSeed()
|
||||||
found++;
|
found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (interruptNet) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// TODO: The seed name resolve may fail, yielding an IP of [::], which results in
|
// TODO: The seed name resolve may fail, yielding an IP of [::], which results in
|
||||||
// addrman assigning the same source to results from different seeds.
|
// 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
|
// This should switch to a hard-coded stable dummy IP for each seed name, so that the
|
||||||
|
|
Loading…
Add table
Reference in a new issue