Skip to content

Commit 5e33c8c

Browse files
committed
fix to previous mechanism
1 parent 065941a commit 5e33c8c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/native/http_request_utils.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ static int s_aws_input_stream_read(struct aws_input_stream *stream, struct aws_b
112112
int result = AWS_OP_SUCCESS;
113113
if (aws_jni_check_and_clear_exception(env)) {
114114
result = aws_raise_error(AWS_ERROR_HTTP_CALLBACK_FAILURE);
115-
(*env)->DeleteLocalRef(env, direct_buffer);
116-
break;
115+
} else {
116+
size_t amt_written = aws_jni_byte_buffer_get_position(env, direct_buffer);
117+
dest->len += amt_written;
117118
}
118119

119120
(*env)->DeleteLocalRef(env, direct_buffer);

0 commit comments

Comments
 (0)