diff options
author | Александр Зацепин <az@mapswithme.com> | 2017-09-07 21:06:17 +0300 |
---|---|---|
committer | Александр Зацепин <az@mapswithme.com> | 2017-09-07 21:28:40 +0300 |
commit | 4b008b2c29f7fdcd6bd51e06682071875b09916a (patch) | |
tree | cf4246174963e1d423e15ab7effe0efc08f259d5 | |
parent | 69df1599cd0a0c575caa910365d4970d68066494 (diff) |
[android] Fixed crash while terminating any chunk during downloading mwmbeta-994MAPSME-5584-crash-in-downloader
-rw-r--r-- | android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java | 1 | ||||
-rw-r--r-- | platform/http_request.cpp | 8 |
2 files changed, 1 insertions, 8 deletions
diff --git a/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java b/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java index 9520063397..0fc91ce0e7 100644 --- a/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java +++ b/android/src/com/mapswithme/maps/downloader/UpdaterDialogFragment.java @@ -396,6 +396,7 @@ public class UpdaterDialogFragment extends BaseMwmDialogFragment } else { + MapManager.nativeCancel(CountryItem.getRootId()); mFragment.finish(); } } diff --git a/platform/http_request.cpp b/platform/http_request.cpp index 846646194c..a8f49ff7c9 100644 --- a/platform/http_request.cpp +++ b/platform/http_request.cpp @@ -218,9 +218,6 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback void SaveResumeChunks() { - if (m_writer == nullptr) - return; - try { // Flush writer before saving downloaded chunks. @@ -278,11 +275,6 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback if (m_status != ECompleted && m_goodChunksCount % 10 == 0) SaveResumeChunks(); } - else if (result == ChunksDownloadStrategy::ENoFreeServers) - { - // There is no server which is able to re-download chunk. - m_status = EFailed; - } if (m_status != EInProgress) { |