mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
refs #712, improved readers
* only trigger read when network interface is available * do not trigger all reads at same time but slightly shifted * renamed to hasReceivedOkReply()
This commit is contained in:
@@ -197,6 +197,15 @@ namespace BlackCore
|
||||
CStatusMessageList CSetupReader::triggerReadSetup()
|
||||
{
|
||||
if (m_shutdown) { return CStatusMessage(this, CStatusMessage::SeverityError, "shutdown"); }
|
||||
if (!CNetworkUtils::hasConnectedInterface())
|
||||
{
|
||||
const CStatusMessage m(this, CStatusMessage::SeverityError,
|
||||
"No network, cancelled reading of setup");
|
||||
CStatusMessageList msgs(m);
|
||||
msgs.push_back(this->manageSetupAvailability(false, false));
|
||||
return msgs;
|
||||
}
|
||||
|
||||
const CUrl url(this->m_bootstrapUrls.obtainNextWorkingUrl());
|
||||
if (url.isEmpty())
|
||||
{
|
||||
@@ -456,7 +465,7 @@ namespace BlackCore
|
||||
}
|
||||
else
|
||||
{
|
||||
bool cacheAvailable = this->m_setup.getThreadLocal().wasLoaded();
|
||||
bool cacheAvailable = this->m_setup.get().wasLoaded();
|
||||
available = cacheAvailable && this->m_bootstrapMode != Explicit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user