mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-30 05:51:23 +08:00
refs #857, check if network is accessible in readers
* new read state "skipped" * renamed to "isNetworkConnectedAndAccessible" * checking before reading, which would only fail if network is not accessible
This commit is contained in:
committed by
Mathew Sutcliffe
parent
04e980a6ae
commit
1ced7f3c0b
@@ -67,7 +67,7 @@ namespace BlackCore
|
||||
|
||||
void CVatsimBookingReader::ps_read()
|
||||
{
|
||||
if (!this->isNetworkAvailable())
|
||||
if (!this->isNetworkConnectedAndAccessible())
|
||||
{
|
||||
CLogMessage(this).warning("No network, cannot read VATSIM bookings");
|
||||
return;
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace BlackCore
|
||||
|
||||
void CVatsimDataFileReader::ps_read()
|
||||
{
|
||||
if (!this->isNetworkAvailable())
|
||||
if (!this->isNetworkConnectedAndAccessible())
|
||||
{
|
||||
CLogMessage(this).warning("No network, cannot read VATSIM data file");
|
||||
return;
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace BlackCore
|
||||
void CVatsimMetarReader::readMetars()
|
||||
{
|
||||
if (this->isAbandoned()) { return; }
|
||||
if (!this->isNetworkAvailable())
|
||||
if (!this->isNetworkConnectedAndAccessible())
|
||||
{
|
||||
CLogMessage(this).warning("No network, cannot read METARs");
|
||||
return;
|
||||
|
||||
@@ -71,6 +71,7 @@ namespace BlackCore
|
||||
void CVatsimStatusFileReader::ps_read()
|
||||
{
|
||||
this->threadAssertCheck();
|
||||
if (!this->isNetworkConnectedAndAccessible()) { return; }
|
||||
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing application");
|
||||
CFailoverUrlList urls(sApp->getGlobalSetup().getVatsimStatusFileUrls());
|
||||
|
||||
Reference in New Issue
Block a user