Review feedback

reviewable/pr8008/r9
Craig Tiller 8 years ago
parent 4288101a0b
commit 35e87838a7
  1. 12
      src/core/ext/transport/chttp2/transport/chttp2_transport.c

@ -904,7 +904,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op,
if (grpc_http_trace) { if (grpc_http_trace) {
char *str = grpc_transport_stream_op_string(op); char *str = grpc_transport_stream_op_string(op);
gpr_log(GPR_DEBUG, "perform_stream_op_locked: %s", str); gpr_log(GPR_DEBUG, "perform_stream_op_locked: %s; on_complete = %p", str,
op->on_complete);
gpr_free(str); gpr_free(str);
} }
@ -913,10 +914,6 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op,
on_complete = grpc_closure_create(do_nothing, NULL); on_complete = grpc_closure_create(do_nothing, NULL);
} }
if (grpc_http_trace) {
gpr_log(GPR_DEBUG, " on_complete = %p", on_complete);
}
/* use final_data as a barrier until enqueue time; the inital counter is /* use final_data as a barrier until enqueue time; the inital counter is
dropped at the end of this function */ dropped at the end of this function */
on_complete->next_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT; on_complete->next_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT;
@ -1009,6 +1006,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, void *stream_op,
(ssize_t)s->flow_controlled_buffer.length + (ssize_t)len; (ssize_t)s->flow_controlled_buffer.length + (ssize_t)len;
s->complete_fetch_covered_by_poller = op->covered_by_poller; s->complete_fetch_covered_by_poller = op->covered_by_poller;
if (flags & GRPC_WRITE_BUFFER_HINT) { if (flags & GRPC_WRITE_BUFFER_HINT) {
/* allow up to 64kb to be buffered */
/* TODO(ctiller): make this configurable */
s->fetching_slice_end_offset -= 65536; s->fetching_slice_end_offset -= 65536;
} }
continue_fetching_send_locked(exec_ctx, t, s); continue_fetching_send_locked(exec_ctx, t, s);
@ -1233,7 +1232,6 @@ void grpc_chttp2_maybe_complete_recv_initial_metadata(grpc_exec_ctx *exec_ctx,
if (s->seen_error) { if (s->seen_error) {
while ((bs = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames)) != while ((bs = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames)) !=
NULL) { NULL) {
gpr_log(GPR_DEBUG, "discard %p", bs);
incoming_byte_stream_destroy_locked(exec_ctx, bs, GRPC_ERROR_NONE); incoming_byte_stream_destroy_locked(exec_ctx, bs, GRPC_ERROR_NONE);
} }
} }
@ -1252,7 +1250,6 @@ void grpc_chttp2_maybe_complete_recv_message(grpc_exec_ctx *exec_ctx,
while (s->final_metadata_requested && s->seen_error && while (s->final_metadata_requested && s->seen_error &&
(bs = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames)) != (bs = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames)) !=
NULL) { NULL) {
gpr_log(GPR_DEBUG, "discard %p", bs);
incoming_byte_stream_destroy_locked(exec_ctx, bs, GRPC_ERROR_NONE); incoming_byte_stream_destroy_locked(exec_ctx, bs, GRPC_ERROR_NONE);
} }
if (s->incoming_frames.head != NULL) { if (s->incoming_frames.head != NULL) {
@ -1277,7 +1274,6 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx,
if (s->seen_error) { if (s->seen_error) {
while ((bs = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames)) != while ((bs = grpc_chttp2_incoming_frame_queue_pop(&s->incoming_frames)) !=
NULL) { NULL) {
gpr_log(GPR_DEBUG, "discard %p", bs);
incoming_byte_stream_destroy_locked(exec_ctx, bs, GRPC_ERROR_NONE); incoming_byte_stream_destroy_locked(exec_ctx, bs, GRPC_ERROR_NONE);
} }
} }

Loading…
Cancel
Save