This commit is contained in:
@ -266,9 +266,6 @@ void direct_open_file::reader_thread() {
|
|||||||
chunk_lock.unlock();
|
chunk_lock.unlock();
|
||||||
|
|
||||||
download_chunk(next_chunk, true);
|
download_chunk(next_chunk, true);
|
||||||
|
|
||||||
chunk_lock.lock();
|
|
||||||
check_and_wait();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event_system::instance().raise<download_end>(get_api_path(), "direct",
|
event_system::instance().raise<download_end>(get_api_path(), "direct",
|
||||||
|
@ -181,8 +181,10 @@ auto ring_buffer_open_file::download_chunk(std::size_t chunk,
|
|||||||
};
|
};
|
||||||
unlock_and_notify();
|
unlock_and_notify();
|
||||||
|
|
||||||
auto res = get_provider().read_file_bytes(
|
auto res{
|
||||||
get_api_path(), data_size, data_offset, buffer, stop_requested_);
|
get_provider().read_file_bytes(get_api_path(), data_size, data_offset,
|
||||||
|
buffer, stop_requested_),
|
||||||
|
};
|
||||||
|
|
||||||
chunk_lock.lock();
|
chunk_lock.lock();
|
||||||
if (chunk < ring_begin_ || chunk > ring_end_) {
|
if (chunk < ring_begin_ || chunk > ring_end_) {
|
||||||
|
Reference in New Issue
Block a user