diff --git a/src/blackcore/data/globalsetup.cpp b/src/blackcore/data/globalsetup.cpp index 4ab586721..e8135f027 100644 --- a/src/blackcore/data/globalsetup.cpp +++ b/src/blackcore/data/globalsetup.cpp @@ -155,9 +155,9 @@ namespace BlackCore pingUrl.appendQuery("uuid", this->identifier().toUuidString()); pingUrl.appendQuery("application", sApp->getApplicationNameAndVersion()); - if (type.testFlag(PingLogoff)) { pingUrl.appendQuery("logoff", "true"); } + if (type.testFlag(PingLogoff)) { pingUrl.appendQuery("logoff", "true"); } if (type.testFlag(PingShutdown)) { pingUrl.appendQuery("shutdown", "true"); } - if (type.testFlag(PingStarted)) { pingUrl.appendQuery("started", "true"); } + if (type.testFlag(PingStarted)) { pingUrl.appendQuery("started", "true"); } return pingUrl; } diff --git a/src/blackcore/db/networkwatchdog.cpp b/src/blackcore/db/networkwatchdog.cpp index bac9a2d67..5a08a68d5 100644 --- a/src/blackcore/db/networkwatchdog.cpp +++ b/src/blackcore/db/networkwatchdog.cpp @@ -240,7 +240,7 @@ namespace BlackCore QPointer myself(this); QTimer::singleShot(0, this, [ = ] { - if (!myself) { return; } + if (!sApp || sApp->isShuttingDown() || !myself) { return; } this->setNetworkAccessibility(accessibility); }); return; diff --git a/src/blackcore/db/networkwatchdog.h b/src/blackcore/db/networkwatchdog.h index d058c0999..1db3b859b 100644 --- a/src/blackcore/db/networkwatchdog.h +++ b/src/blackcore/db/networkwatchdog.h @@ -183,17 +183,17 @@ namespace BlackCore std::atomic_bool m_logOwnMessages { true }; std::atomic_bool m_doDetailedCheck { true }; std::atomic_bool m_networkAccessible { true }; - std::atomic_bool m_disableNetworkCheck { false }; //!< if this is true, network accessible always reports true/accessible + std::atomic_bool m_disableNetworkCheck { false }; //!< if this is true, network accessible always reports true/accessible std::atomic_bool m_online { true }; std::atomic_bool m_internetAccessible { true }; std::atomic_bool m_dbAccessible { true }; - std::atomic_bool m_lastClientPingSuccess { true }; //!< ping swift DB client service + std::atomic_bool m_lastClientPingSuccess { true }; //!< ping swift DB client service, real HTTP response std::atomic_bool m_checkDbAccessibility { true }; std::atomic_bool m_checkSharedUrl { true }; - std::atomic_bool m_checkInProgress { false }; //!< a check is currently in progress + std::atomic_bool m_checkInProgress { false }; //!< a check is currently in progress std::atomic_int m_networkAccessibility { QNetworkAccessManager::Accessible }; //!< last state - std::atomic_int m_totalCheckCount { 0 }; //!< counting number of checks - std::atomic_int m_totalBadCountDb { 0 }; //!< Total number of DB failing counts (only real responses when tried) + std::atomic_int m_totalCheckCount { 0 }; //!< counting number of checks + std::atomic_int m_totalBadCountDb { 0 }; //!< Total number of DB failing counts (only real responses when tried) std::atomic_int m_totalBadCountInternet { 0 }; //!< Total number of Internet failing count (only when network is accessible) std::atomic_int m_totalGoodCountDb { 0 }; std::atomic_int m_totalGoodCountInternet { 0 };