mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 13:35:34 +08:00
Ref T121, check if Internet is accessible
* in case the internet provider is down, this is not detected * extended test to detect if access is possible * in case of downtime this indicated in status component
This commit is contained in:
committed by
Mathew Sutcliffe
parent
b70fb70d60
commit
f3847bd33c
@@ -64,7 +64,7 @@ namespace BlackCore
|
||||
{
|
||||
this->threadAssertCheck();
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
if (!this->isNetworkAccessible("No network, cannot read VATSIM bookings")) { return; }
|
||||
if (!this->isInternetAccessible("No network/internet access, cannot read VATSIM bookings")) { return; }
|
||||
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "No application");
|
||||
const QUrl url(sApp->getGlobalSetup().getVatsimBookingsUrl());
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace BlackCore
|
||||
{
|
||||
this->threadAssertCheck();
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
if (!this->isNetworkAccessible("No network, cannot read VATSIM data file")) { return; }
|
||||
if (!this->isInternetAccessible("No network/internet access, cannot read VATSIM data file")) { return; }
|
||||
|
||||
// round robin for load balancing
|
||||
// remark: Don't use QThread to run network operations in the background
|
||||
|
||||
@@ -76,7 +76,7 @@ namespace BlackCore
|
||||
{
|
||||
this->threadAssertCheck();
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
if (!this->isNetworkAccessible("No network, cannot read METARs")) { return; }
|
||||
if (!this->isInternetAccessible("No network/internet access, cannot read METARs")) { return; }
|
||||
|
||||
CFailoverUrlList urls(sApp->getVatsimMetarUrls());
|
||||
const CUrl url(urls.obtainNextWorkingUrl(true));
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace BlackCore
|
||||
{
|
||||
this->threadAssertCheck();
|
||||
if (!this->doWorkCheck()) { return; }
|
||||
if (!this->isNetworkAccessible("No network, cannot read VATSIM status file")) { return; }
|
||||
if (!this->isInternetAccessible("No network/internet access, cannot read VATSIM status file")) { return; }
|
||||
|
||||
Q_ASSERT_X(sApp, Q_FUNC_INFO, "Missing application");
|
||||
CFailoverUrlList urls(sApp->getGlobalSetup().getVatsimStatusFileUrls());
|
||||
|
||||
Reference in New Issue
Block a user