Fix a bug where OP_CANCEL is completed prematurely

pull/10958/head
Muxi Yan 8 years ago
parent 6626a86923
commit 3b8f0ce97b
  1. 4
      src/core/ext/transport/cronet/transport/cronet_transport.c

@ -886,6 +886,10 @@ static bool op_can_be_run(grpc_transport_stream_op_batch *curr_op,
!stream_state->state_op_done[OP_RECV_MESSAGE]) { !stream_state->state_op_done[OP_RECV_MESSAGE]) {
CRONET_LOG(GPR_DEBUG, "Because"); CRONET_LOG(GPR_DEBUG, "Because");
result = false; result = false;
} else if (curr_op->cancel_stream &&
!stream_state->state_callback_received[OP_CANCELED]) {
CRONET_LOG(GPR_DEBUG, "Because");
result = false;
} else if (curr_op->recv_trailing_metadata) { } else if (curr_op->recv_trailing_metadata) {
/* We aren't done with trailing metadata yet */ /* We aren't done with trailing metadata yet */
if (!stream_state->state_op_done[OP_RECV_TRAILING_METADATA]) { if (!stream_state->state_op_done[OP_RECV_TRAILING_METADATA]) {

Loading…
Cancel
Save