We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 661105a commit 4e90a03Copy full SHA for 4e90a03
1 file changed
source/s3_parallel_input_stream.c
@@ -369,6 +369,12 @@ static struct aws_input_stream_vtable s_aws_s3_mmap_part_streaming_input_stream_
369
void aws_streaming_input_stream_reset(struct aws_input_stream *stream) {
370
struct aws_s3_mmap_part_streaming_input_stream_impl *impl =
371
AWS_CONTAINER_OF(stream, struct aws_s3_mmap_part_streaming_input_stream_impl, base);
372
+ if (impl->loading_future) {
373
+ /* If there is a loading future, wait for it to complete. */
374
+ /* TODO: probably better to cancel the future, but we don't support cancel yet */
375
+ aws_future_bool_wait(impl->loading_future, MAX_TIMEOUT_NS_P);
376
+ aws_future_bool_release(impl->loading_future);
377
+ }
378
impl->total_length_read = 0;
379
impl->eos_loaded = false;
380
impl->eos_reached = false;
0 commit comments