mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Fix race condition between previous and next weather request
Once a weather request was finished, its worker gets destroyed automatically but not immediately. This can cause it to still exist, when the next request is being processed. Therefore wait with sending the fetchingFinished() signal, until the worker is fully destroyed. ref T235
This commit is contained in:
committed by
Klaus Basan
parent
597f3f7a6a
commit
0c7d2b23f4
@@ -98,7 +98,9 @@ namespace BlackWxPlugin
|
||||
|
||||
void CWeatherDataGfs::fetchingWeatherDataFinished()
|
||||
{
|
||||
emit fetchingFinished();
|
||||
// If the worker is not destroyed yet, try again in 10 ms.
|
||||
if (m_parseGribFileWorker) { QTimer::singleShot(10, this, &CWeatherDataGfs::fetchingWeatherDataFinished); }
|
||||
else { emit fetchingFinished(); }
|
||||
}
|
||||
|
||||
void CWeatherDataGfs::parseGfsFile(QNetworkReply *nwReplyPtr)
|
||||
|
||||
Reference in New Issue
Block a user