Skip to content

Commit a077a90

Browse files
committed
Merge #10215: Check interruptNet during dnsseed lookups
b2c9254 Check interruptNet during dnsseed lookups (Matt Corallo) Tree-SHA512: a76b5749b085d5571ac65a6925bb1c50fa1d02c02854d9126224dc2ec419eb9103f7c92bf9a0bbd39c7dee93a2266dc3973fb16b48e8daea057f45d452e2513c
2 parents c5e9e42 + b2c9254 commit a077a90

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/net.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,9 @@ void CConnman::ThreadDNSAddressSeed()
15851585
LogPrintf("Loading addresses from DNS seeds (could take a while)\n");
15861586

15871587
BOOST_FOREACH(const CDNSSeedData &seed, vSeeds) {
1588+
if (interruptNet) {
1589+
return;
1590+
}
15881591
if (HaveNameProxy()) {
15891592
AddOneShot(seed.host);
15901593
} else {
@@ -1602,6 +1605,9 @@ void CConnman::ThreadDNSAddressSeed()
16021605
found++;
16031606
}
16041607
}
1608+
if (interruptNet) {
1609+
return;
1610+
}
16051611
// TODO: The seed name resolve may fail, yielding an IP of [::], which results in
16061612
// addrman assigning the same source to results from different seeds.
16071613
// This should switch to a hard-coded stable dummy IP for each seed name, so that the

0 commit comments

Comments
 (0)