mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Do not trigger loads if they are doomed to fail
This commit is contained in:
@@ -45,16 +45,22 @@ namespace BlackCore
|
||||
QTimer::singleShot(0, &m_updateTimer, [this] { this->m_updateTimer.start(); }); // restart
|
||||
}
|
||||
|
||||
bool CNetworkWatchdog::hasWorkingSharedUrl() const
|
||||
{
|
||||
if (!m_networkAccessible) { return false; }
|
||||
return !this->getWorkingSharedUrl().isEmpty();
|
||||
}
|
||||
|
||||
CUrl CNetworkWatchdog::getWorkingSharedUrl() const
|
||||
{
|
||||
if (!m_networkAccessible) return CUrl();
|
||||
if (!m_networkAccessible) { return CUrl(); }
|
||||
QReadLocker l(&m_lockSharedUrl);
|
||||
return m_workingSharedUrl;
|
||||
}
|
||||
|
||||
int CNetworkWatchdog::triggerCheck()
|
||||
{
|
||||
if (!this->doWorkCheck()) return false; // senseless
|
||||
if (!this->doWorkCheck()) { return false; } // senseless
|
||||
if (m_checkInProgress) { return -1; }
|
||||
|
||||
const int n = this->getCheckCount();
|
||||
|
||||
Reference in New Issue
Block a user