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