Skip to content

Commit cb6cd15

Browse files
committed
fix to ensure noop fires callback
1 parent 28d3999 commit cb6cd15

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

source/h1_stream.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,11 @@ static int s_stream_write_data(
374374
AWS_PRECONDITION(options);
375375
struct aws_h1_stream *stream = AWS_CONTAINER_OF(stream_base, struct aws_h1_stream, base);
376376

377-
/* NULL data without end_stream is a no-op */
377+
/* NULL data without end_stream is a no-op, but still fire the callback */
378378
if (!options->data && !options->end_stream) {
379+
if (options->on_complete) {
380+
options->on_complete(stream_base, AWS_ERROR_SUCCESS, options->user_data);
381+
}
379382
return AWS_OP_SUCCESS;
380383
}
381384

0 commit comments

Comments
 (0)