Skip to content

Commit

Permalink
hack
Browse files Browse the repository at this point in the history
  • Loading branch information
waahm7 committed Jul 15, 2024
1 parent 0ab4d58 commit 90eecb5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion source/s3_auto_ranged_get.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void s_s3_auto_ranged_get_request_finished(

static struct aws_s3_meta_request_vtable s_s3_auto_ranged_get_vtable = {
.update = s_s3_auto_ranged_get_update,
.send_request_finish = aws_s3_meta_request_send_request_finish_default,
.send_request_finish = s_s3_auto_ranged_get_send_request_finish,
.prepare_request = s_s3_auto_ranged_get_prepare_request,
.init_signing_date_time = aws_s3_meta_request_init_signing_date_time_default,
.sign_request = aws_s3_meta_request_sign_request_default,
Expand All @@ -44,6 +44,18 @@ static struct aws_s3_meta_request_vtable s_s3_auto_ranged_get_vtable = {
.finish = aws_s3_meta_request_finish_default,
};

static void s_s3_auto_ranged_get_send_request_finish(
struct aws_s3_connection *connection,
struct aws_http_stream *stream,
int error_code) {
struct aws_s3_request *request = connection->request;
if (request->request_tag == AWS_S3_AUTO_RANGE_GET_REQUEST_TYPE_GET_OBJECT_WITH_RANGE) {
/* TODO: the single part upload may also be improved from a timeout as multipart. */
aws_s3_client_update_upload_part_timeout(request->meta_request->client, request, error_code);
}
aws_s3_meta_request_send_request_finish_default(connection, stream, error_code);
}

static int s_s3_auto_ranged_get_success_status(struct aws_s3_meta_request *meta_request) {
AWS_PRECONDITION(meta_request);

Expand Down
2 changes: 1 addition & 1 deletion source/s3_meta_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,7 +1073,7 @@ void aws_s3_meta_request_send_request(struct aws_s3_meta_request *meta_request,
options.on_metrics = s_s3_meta_request_stream_metrics;
}
options.on_complete = s_s3_meta_request_stream_complete;
if (request->request_type == AWS_S3_REQUEST_TYPE_UPLOAD_PART) {
if (request->request_type == AWS_S3_REQUEST_TYPE_UPLOAD_PART || request->request_type == AWS_S3_REQUEST_TYPE_GET_OBJECT) {
options.response_first_byte_timeout_ms = aws_atomic_load_int(&meta_request->client->upload_timeout_ms);
request->upload_timeout_ms = (size_t)options.response_first_byte_timeout_ms;
}
Expand Down

0 comments on commit 90eecb5

Please sign in to comment.