From dbf5b2db9034e6ef0dd7b98cf237c5522486676e Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Mon, 4 Dec 2023 13:26:38 -0800 Subject: [PATCH] trivials --- include/aws/s3/s3_client.h | 6 +----- source/s3_request.c | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/aws/s3/s3_client.h b/include/aws/s3/s3_client.h index 71e7b95a7..e55557387 100644 --- a/include/aws/s3/s3_client.h +++ b/include/aws/s3/s3_client.h @@ -209,8 +209,7 @@ typedef void(aws_s3_meta_request_progress_fn)( void *user_data); /** - * Invoked to report the telemetry of the meta request once a single request finishes. Invoked from the thread of the - * connection that request made from. + * Invoked to report the telemetry of the meta request once a single request finishes. * Note: *metrics is only valid for the duration of the callback. If you need to keep it around, use * `aws_s3_request_metrics_acquire` */ @@ -652,9 +651,6 @@ struct aws_s3_meta_request_options { * If set the request will keep track of the metrics from `aws_s3_request_metrics`, and fire the callback when the * request finishes receiving response. * See `aws_s3_meta_request_telemetry_fn` - * - * Notes: - * - The callback will be invoked multiple times from different threads. */ aws_s3_meta_request_telemetry_fn *telemetry_callback; diff --git a/source/s3_request.c b/source/s3_request.c index d2e426df6..aab3d9526 100644 --- a/source/s3_request.c +++ b/source/s3_request.c @@ -94,14 +94,12 @@ static void s_s3_request_clean_up_send_data_message(struct aws_s3_request *reque void aws_s3_request_clean_up_send_data(struct aws_s3_request *request) { AWS_PRECONDITION(request); + /* The metrics should be collected and provided to user before reaching here */ + AWS_FATAL_ASSERT(request->send_data.metrics == NULL); s_s3_request_clean_up_send_data_message(request); aws_signable_destroy(request->send_data.signable); - - /* The metrics should be collected and provided before reaching here */ - AWS_FATAL_ASSERT(request->send_data.metrics == NULL); - request->send_data.signable = NULL; aws_http_headers_release(request->send_data.response_headers); request->send_data.response_headers = NULL;