|
|
|
@ -528,10 +528,11 @@ static void destroy_transport_locked(grpc_exec_ctx *exec_ctx, void *tp, |
|
|
|
|
|
|
|
|
|
static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { |
|
|
|
|
grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; |
|
|
|
|
grpc_closure_sched(exec_ctx, grpc_closure_create( |
|
|
|
|
destroy_transport_locked, t, |
|
|
|
|
grpc_combiner_scheduler(t->combiner, false)), |
|
|
|
|
GRPC_ERROR_NONE); |
|
|
|
|
grpc_closure_sched( |
|
|
|
|
exec_ctx, |
|
|
|
|
grpc_closure_create(destroy_transport_locked, t, |
|
|
|
|
grpc_combiner_scheduler(t->combiner, false)), |
|
|
|
|
GRPC_ERROR_NONE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void close_transport_locked(grpc_exec_ctx *exec_ctx, |
|
|
|
@ -709,8 +710,9 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, |
|
|
|
|
|
|
|
|
|
s->destroy_stream_arg = then_schedule_closure; |
|
|
|
|
grpc_closure_sched( |
|
|
|
|
exec_ctx, grpc_closure_init(&s->destroy_stream, destroy_stream_locked, s, |
|
|
|
|
grpc_combiner_scheduler(t->combiner, false)), |
|
|
|
|
exec_ctx, |
|
|
|
|
grpc_closure_init(&s->destroy_stream, destroy_stream_locked, s, |
|
|
|
|
grpc_combiner_scheduler(t->combiner, false)), |
|
|
|
|
GRPC_ERROR_NONE); |
|
|
|
|
GPR_TIMER_END("destroy_stream", 0); |
|
|
|
|
} |
|
|
|
@ -1534,9 +1536,10 @@ static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, |
|
|
|
|
op->handler_private.extra_arg = gt; |
|
|
|
|
GRPC_CHTTP2_REF_TRANSPORT(t, "transport_op"); |
|
|
|
|
grpc_closure_sched( |
|
|
|
|
exec_ctx, grpc_closure_init(&op->handler_private.closure, |
|
|
|
|
perform_transport_op_locked, op, |
|
|
|
|
grpc_combiner_scheduler(t->combiner, false)), |
|
|
|
|
exec_ctx, |
|
|
|
|
grpc_closure_init(&op->handler_private.closure, |
|
|
|
|
perform_transport_op_locked, op, |
|
|
|
|
grpc_combiner_scheduler(t->combiner, false)), |
|
|
|
|
GRPC_ERROR_NONE); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1621,7 +1624,8 @@ void grpc_chttp2_maybe_complete_recv_trailing_metadata(grpc_exec_ctx *exec_ctx, |
|
|
|
|
exec_ctx, &s->unprocessed_incoming_frames_buffer); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
bool pending_data = s->pending_byte_stream || s->unprocessed_incoming_frames_buffer.length > 0; |
|
|
|
|
bool pending_data = s->pending_byte_stream || |
|
|
|
|
s->unprocessed_incoming_frames_buffer.length > 0; |
|
|
|
|
if (s->read_closed && s->frame_storage.length == 0 && |
|
|
|
|
(!pending_data || s->seen_error) && |
|
|
|
|
s->recv_trailing_metadata_finished != NULL) { |
|
|
|
@ -2267,8 +2271,9 @@ static void keepalive_watchdog_fired_locked(grpc_exec_ctx *exec_ctx, void *arg, |
|
|
|
|
if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_PINGING) { |
|
|
|
|
if (error == GRPC_ERROR_NONE) { |
|
|
|
|
t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DYING; |
|
|
|
|
close_transport_locked(exec_ctx, t, GRPC_ERROR_CREATE_FROM_STATIC_STRING( |
|
|
|
|
"keepalive watchdog timeout")); |
|
|
|
|
close_transport_locked( |
|
|
|
|
exec_ctx, t, |
|
|
|
|
GRPC_ERROR_CREATE_FROM_STATIC_STRING("keepalive watchdog timeout")); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
/** The watchdog timer should have been cancelled by
|
|
|
|
@ -2500,7 +2505,7 @@ static grpc_error *deframe_unprocessed_incoming_frames( |
|
|
|
|
grpc_slice_buffer_undo_take_first( |
|
|
|
|
&s->unprocessed_incoming_frames_buffer, |
|
|
|
|
grpc_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); |
|
|
|
|
grpc_slice_unref(slice); |
|
|
|
|
grpc_slice_unref_internal(exec_ctx, slice); |
|
|
|
|
return GRPC_ERROR_NONE; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|