refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2024-12-20 21:03:16 -06:00
parent f260f1d50a
commit 4a203ebf47

View File

@ -108,13 +108,14 @@ void open_file::download_chunk(std::size_t chunk, bool skip_active,
if ((get_api_error() == api_error::success) && (chunk < read_state_.size()) &&
not read_state_[chunk]) {
if (active_downloads_.find(chunk) != active_downloads_.end()) {
if (not skip_active) {
auto active_download = active_downloads_.at(chunk);
download_lock.unlock();
active_download->wait();
if (skip_active) {
return;
}
auto active_download = active_downloads_.at(chunk);
download_lock.unlock();
active_download->wait();
return;
}