This commit is contained in:
kssenii 2022-03-07 22:03:12 +01:00
parent 0737aef472
commit 4f53080921

View File

@ -88,6 +88,11 @@ void FileSegment::resetDownloader()
if (getCallerId() != downloader_id)
throw Exception(ErrorCodes::LOGICAL_ERROR, "Downloader can be reset only by downloader");
if (downloaded_size == range().size())
setDownloaded(segment_lock);
else
download_state = State::PARTIALLY_DOWNLOADED;
downloader_id.clear();
}