refactor
This commit is contained in:
@ -275,6 +275,8 @@ auto direct_open_file::read(std::size_t read_size, std::uint64_t read_offset,
|
|||||||
for (std::size_t chunk = begin_chunk;
|
for (std::size_t chunk = begin_chunk;
|
||||||
not stop_requested_ && (res == api_error::success) && (read_size > 0U);
|
not stop_requested_ && (res == api_error::success) && (read_size > 0U);
|
||||||
++chunk) {
|
++chunk) {
|
||||||
|
reset_timeout();
|
||||||
|
|
||||||
if (chunk > ring_pos_) {
|
if (chunk > ring_pos_) {
|
||||||
forward(chunk - ring_pos_);
|
forward(chunk - ring_pos_);
|
||||||
} else if (chunk < ring_pos_) {
|
} else if (chunk < ring_pos_) {
|
||||||
|
@ -338,6 +338,8 @@ auto ring_buffer_open_file::read(std::size_t read_size,
|
|||||||
for (std::size_t chunk = begin_chunk;
|
for (std::size_t chunk = begin_chunk;
|
||||||
not stop_requested_ && (res == api_error::success) && (read_size > 0U);
|
not stop_requested_ && (res == api_error::success) && (read_size > 0U);
|
||||||
++chunk) {
|
++chunk) {
|
||||||
|
reset_timeout();
|
||||||
|
|
||||||
if (chunk > ring_pos_) {
|
if (chunk > ring_pos_) {
|
||||||
forward(chunk - ring_pos_);
|
forward(chunk - ring_pos_);
|
||||||
} else if (chunk < ring_pos_) {
|
} else if (chunk < ring_pos_) {
|
||||||
|
Reference in New Issue
Block a user