diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2017-09-13 11:40:45 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2017-09-13 16:25:40 +0300 |
commit | 9cc1fb3862a0dce5f418f4abe22a657ea93278f8 (patch) | |
tree | 405dae1ef0391ab140d3ba06ca96c693623ef392 /platform | |
parent | b36f653eafe30046ceeb4a2608fa2eb25383b21d (diff) |
Fixed download failure notification
Diffstat (limited to 'platform')
-rw-r--r-- | platform/http_request.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/http_request.cpp b/platform/http_request.cpp index a8f49ff7c9..e044383e96 100644 --- a/platform/http_request.cpp +++ b/platform/http_request.cpp @@ -218,6 +218,9 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback void SaveResumeChunks() { + if (m_writer == nullptr) + return; + try { // Flush writer before saving downloaded chunks. @@ -275,6 +278,11 @@ class FileHttpRequest : public HttpRequest, public IHttpThreadCallback if (m_status != ECompleted && m_goodChunksCount % 10 == 0) SaveResumeChunks(); } + else if (result == ChunksDownloadStrategy::ENoFreeServers) + { + // There is no any server which is able to re-download chunk. + m_status = EFailed; + } if (m_status != EInProgress) { |