mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-04 20:51:27 +02:00
DNS seeds: don't query DNS while network is inactive
This commit is contained in:
10
src/net.cpp
10
src/net.cpp
@ -1630,8 +1630,14 @@ void CConnman::ThreadDNSAddressSeed()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (interruptNet) {
|
if (interruptNet) return;
|
||||||
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);
|
LogPrintf("Loading addresses from DNS seed %s\n", seed);
|
||||||
|
Reference in New Issue
Block a user