Minor change

This commit is contained in:
Alexey Milovidov 2021-07-26 04:51:12 +03:00
parent 5c3f5cb35a
commit 663dc91c99

View File

@ -139,6 +139,12 @@ off_t AsynchronousReadBufferFromFileDescriptor::seek(off_t offset, int whence)
void AsynchronousReadBufferFromFileDescriptor::rewind()
{
if (prefetch_request_id)
{
reader->wait(*prefetch_request_id, {});
prefetch_request_id.reset();
}
/// Clearing the buffer with existing data. New data will be read on subsequent call to 'next'.
working_buffer.resize(0);
pos = working_buffer.begin();