mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
DNS seeds: don't query DNS while network is inactive
This commit is contained in:
parent
fa5894f7f5
commit
96954d1794
1 changed files with 8 additions and 2 deletions
10
src/net.cpp
10
src/net.cpp
|
|
@ -1630,8 +1630,14 @@ void CConnman::ThreadDNSAddressSeed()
|
|||
}
|
||||
}
|
||||
|
||||
if (interruptNet) {
|
||||
return;
|
||||
if (interruptNet) return;
|
||||
|
||||
// hold off on querying seeds if p2p network deactivated
|
||||
if (!fNetworkActive) {
|
||||
LogPrintf("Waiting for network to be reactivated before querying DNS seeds.\n");
|
||||
do {
|
||||
if (!interruptNet.sleep_for(std::chrono::seconds{1})) return;
|
||||
} while (!fNetworkActive);
|
||||
}
|
||||
|
||||
LogPrintf("Loading addresses from DNS seed %s\n", seed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue