From c23f455d42d410ccea97441decec4aea1d572ad2 Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Thu, 16 Jan 2020 10:46:20 +0300 Subject: [PATCH] [storage] incorrect downloading type after failed download is fixed --- storage/http_map_files_downloader.cpp | 4 +++- storage/map_files_downloader.cpp | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/http_map_files_downloader.cpp b/storage/http_map_files_downloader.cpp index d992754cbd..927f9769af 100644 --- a/storage/http_map_files_downloader.cpp +++ b/storage/http_map_files_downloader.cpp @@ -55,7 +55,9 @@ void HttpMapFilesDownloader::Download() { CHECK_THREAD_CHECKER(m_checker, ()); - auto const & queuedCountry = m_queue.front(); + auto & queuedCountry = m_queue.front(); + + queuedCountry.ClarifyDownloadingType(); auto const urls = MakeUrlList(queuedCountry.GetRelativeUrl()); auto const path = queuedCountry.GetFileDownloadPath(); diff --git a/storage/map_files_downloader.cpp b/storage/map_files_downloader.cpp index 4f96ac8191..977b39db60 100644 --- a/storage/map_files_downloader.cpp +++ b/storage/map_files_downloader.cpp @@ -21,7 +21,6 @@ void MapFilesDownloader::DownloadMapFile(QueuedCountry & queuedCountry) // Fast path: the server list was received before. if (!m_serversList.empty()) { - queuedCountry.ClarifyDownloadingType(); Download(queuedCountry); return; } @@ -44,7 +43,6 @@ void MapFilesDownloader::DownloadMapFile(QueuedCountry & queuedCountry) // synchronously downloaded the server list. // It is now safe to repost the download task to the UI thread. GetPlatform().RunTask(Platform::Thread::Gui, [=]() mutable { - queuedCountry.ClarifyDownloadingType(); Download(queuedCountry); }); });