Fix streaming_ready_size_ calculation.

GitOrigin-RevId: 62ad330749e88188697de7f23b525ac9e426d780
This commit is contained in:
levlam 2019-03-04 00:37:25 +03:00
parent b13903646e
commit 1ee2b63230
2 changed files with 2 additions and 1 deletions

View File

@ -71,6 +71,7 @@ void FileLoader::update_download_offset(int64 offset) {
for (auto &it : part_map_) {
it.second.second.reset(); // cancel_query(it.second.second);
}
update_estimated_limit();
loop();
}

View File

@ -58,7 +58,7 @@ void PartsManager::set_streaming_limit(int64 limit) {
}
for (int part_i = 0; part_i < part_count_; part_i++) {
if (is_part_in_streaming_limit(part_i) && part_status_[part_i] == PartStatus::Ready) {
streaming_ready_size_ = get_part(part_i).size;
streaming_ready_size_ += get_part(part_i).size;
}
}
}