mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Avoid issues during shutdown
This commit is contained in:
@@ -669,6 +669,7 @@ namespace BlackCore
|
||||
if (this->m_setupReader)
|
||||
{
|
||||
this->m_setupReader->gracefulShutdown();
|
||||
this->m_setupReader.reset();
|
||||
}
|
||||
|
||||
this->m_fileLogger->close();
|
||||
@@ -934,6 +935,7 @@ namespace BlackCore
|
||||
|
||||
CUrlList CApplication::getVatsimMetarUrls() const
|
||||
{
|
||||
if (this->m_shutdown) { return CUrlList(); }
|
||||
if (this->m_webDataServices)
|
||||
{
|
||||
const CUrlList urls(this->m_webDataServices->getVatsimMetarUrls());
|
||||
@@ -948,6 +950,7 @@ namespace BlackCore
|
||||
|
||||
CUrlList CApplication::getVatsimDataFileUrls() const
|
||||
{
|
||||
if (this->m_shutdown) { return CUrlList(); }
|
||||
if (this->m_webDataServices)
|
||||
{
|
||||
const CUrlList urls(this->m_webDataServices->getVatsimDataFileUrls());
|
||||
|
||||
@@ -79,6 +79,7 @@ namespace BlackCore
|
||||
|
||||
void CVatsimMetarReader::readMetars()
|
||||
{
|
||||
if (this->isAbandoned()) { return; }
|
||||
this->threadAssertCheck();
|
||||
this->restartTimer(true); // when timer active, restart so we cause no undesired reads
|
||||
|
||||
|
||||
Reference in New Issue
Block a user