diff options
author | Muxi Yan <muxi@users.noreply.github.com> | 2017-05-04 08:36:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-04 08:36:24 -0700 |
commit | cbecd7260995383537bd63e91bf53939ddb6e3bf (patch) | |
tree | 75d8234012bcdd1cd5ed6b00a538a0429ca968b5 /src | |
parent | 861919a70368e293456d7f9804c29fcf1b6885ce (diff) | |
parent | 3b8f0ce97b2212942c5d0c32fb4f3c12541a6720 (diff) |
Merge pull request #10958 from muxi/fix-on-cancel-crash
Fix a bug where OP_CANCEL is completed prematurely
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ext/transport/cronet/transport/cronet_transport.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index d4e89d6a6c..67974b0b6a 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/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]) { CRONET_LOG(GPR_DEBUG, "Because"); 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) { /* We aren't done with trailing metadata yet */ if (!stream_state->state_op_done[OP_RECV_TRAILING_METADATA]) { |