mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +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
@@ -132,6 +132,12 @@ namespace BlackCore
|
||||
{
|
||||
this->threadAssertCheck(); // runs in background thread
|
||||
if (this->isShuttingDown()) { return; }
|
||||
entities &= CEntityFlags::AllIcaoAndCountries;
|
||||
if (!this->isNetworkConnectedAndAccessible())
|
||||
{
|
||||
emit this->dataRead(entities, CEntityFlags::ReadSkipped, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
CEntityFlags::Entity entitiesTriggered = CEntityFlags::NoEntity;
|
||||
if (entities.testFlag(CEntityFlags::AircraftIcaoEntity))
|
||||
@@ -181,7 +187,7 @@ namespace BlackCore
|
||||
|
||||
if (entitiesTriggered != CEntityFlags::NoEntity)
|
||||
{
|
||||
emit dataRead(entitiesTriggered, CEntityFlags::StartRead, 0);
|
||||
emit this->dataRead(entitiesTriggered, CEntityFlags::StartRead, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user