@@ -342,7 +342,8 @@ static struct aws_h1_stream *s_stream_new_common(
342342 aws_http_on_incoming_headers_fn * on_incoming_headers ,
343343 aws_http_on_incoming_header_block_done_fn * on_incoming_header_block_done ,
344344 aws_http_on_incoming_body_fn * on_incoming_body ,
345- aws_http_on_stream_complete_fn on_complete ) {
345+ aws_http_on_stream_complete_fn * on_complete ,
346+ aws_http_on_stream_destroy_fn * on_destroy ) {
346347
347348 struct aws_h1_connection * connection = AWS_CONTAINER_OF (connection_base , struct aws_h1_connection , base );
348349
@@ -359,6 +360,7 @@ static struct aws_h1_stream *s_stream_new_common(
359360 stream -> base .on_incoming_header_block_done = on_incoming_header_block_done ;
360361 stream -> base .on_incoming_body = on_incoming_body ;
361362 stream -> base .on_complete = on_complete ;
363+ stream -> base .on_destroy = on_destroy ;
362364
363365 aws_channel_task_init (
364366 & stream -> cross_thread_work_task , s_stream_cross_thread_work_task , stream , "http1_stream_cross_thread_work" );
@@ -384,7 +386,8 @@ struct aws_h1_stream *aws_h1_stream_new_request(
384386 options -> on_response_headers ,
385387 options -> on_response_header_block_done ,
386388 options -> on_response_body ,
387- options -> on_complete );
389+ options -> on_complete ,
390+ options -> on_destroy );
388391 if (!stream ) {
389392 return NULL ;
390393 }
@@ -430,7 +433,8 @@ struct aws_h1_stream *aws_h1_stream_new_request_handler(const struct aws_http_re
430433 options -> on_request_headers ,
431434 options -> on_request_header_block_done ,
432435 options -> on_request_body ,
433- options -> on_complete );
436+ options -> on_complete ,
437+ options -> on_destroy );
434438 if (!stream ) {
435439 return NULL ;
436440 }
0 commit comments