|
|
|
@ -812,12 +812,12 @@ static void set_write_state(grpc_chttp2_transport* t, |
|
|
|
|
write_state_name(t->write_state), |
|
|
|
|
write_state_name(st), reason)); |
|
|
|
|
t->write_state = st; |
|
|
|
|
// If the state is being reset back to idle, it means a write was just
|
|
|
|
|
// finished. Make sure all the run_after_write closures are scheduled.
|
|
|
|
|
//
|
|
|
|
|
// This is also our chance to close the transport if the transport was marked
|
|
|
|
|
// to be closed after all writes finish (for example, we received a go-away
|
|
|
|
|
// from peer while we had some pending writes)
|
|
|
|
|
/* If the state is being reset back to idle, it means a write was just
|
|
|
|
|
finished. Make sure all the run_after_write closures are scheduled. |
|
|
|
|
|
|
|
|
|
This is also our chance to close the transport if the transport was marked |
|
|
|
|
to be closed after all writes finish (for example, if we received a go-away |
|
|
|
|
from peer while we had some pending writes) */ |
|
|
|
|
if (st == GRPC_CHTTP2_WRITE_STATE_IDLE) { |
|
|
|
|
grpc_chttp2_stream* s; |
|
|
|
|
while (grpc_chttp2_list_pop_waiting_for_write_stream(t, &s)) { |
|
|
|
@ -1036,7 +1036,8 @@ static void write_action(void* gt, grpc_error* error) { |
|
|
|
|
grpc_combiner_scheduler(t->combiner))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Callback from the grpc_endpoint after bytes have been written on the wire */ |
|
|
|
|
/* Callback from the grpc_endpoint after bytes have been written by calling
|
|
|
|
|
* sendmsg */ |
|
|
|
|
static void write_action_end_locked(void* tp, grpc_error* error) { |
|
|
|
|
GPR_TIMER_SCOPE("terminate_writing_with_lock", 0); |
|
|
|
|
grpc_chttp2_transport* t = static_cast<grpc_chttp2_transport*>(tp); |
|
|
|
|