PartsManager: recalc streaming_ready_size_ when streaming_offset changes

GitOrigin-RevId: e2b82154cbf9ef1f1bf4ed322f518eb0f4ead0cc
This commit is contained in:
Arseny Smirnov 2019-03-05 10:48:50 +03:00
parent 5c3c141804
commit 986ce38998

View File

@ -30,6 +30,9 @@ Status PartsManager::init_known_prefix(int64 known_prefix, size_t part_size, con
}
void PartsManager::set_streaming_offset(int64 offset) {
SCOPE_EXIT {
set_streaming_limit(streaming_limit_);
};
if (offset < 0 || need_check_ || (!unknown_size_flag_ && get_size() < offset)) {
streaming_offset_ = 0;
return;