aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-06-23 18:08:27 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-06-23 18:08:27 -0700
commit366270eee58df0c59dd3c7453e5ffd0d3d9eebc5 (patch)
tree51ea02868144445ec5d6b581354ccd9a0a6b603e /src/core/ext
parentc7208282aeb2140655f8d4b80335f6945a256a42 (diff)
Fix test
Diffstat (limited to 'src/core/ext')
-rw-r--r--src/core/ext/transport/cronet/transport/cronet_transport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c
index 498b444001..29dfa885de 100644
--- a/src/core/ext/transport/cronet/transport/cronet_transport.c
+++ b/src/core/ext/transport/cronet/transport/cronet_transport.c
@@ -799,11 +799,13 @@ static bool op_can_be_run(grpc_transport_stream_op_batch *curr_op,
}
/* ON_COMPLETE can be processed if one of the following conditions is met:
* 1. the stream failed
- * 2. the stream is cancelled, and the callback is received, or
- * 3. the stream is cancelled, and the stream is never started */
+ * 2. the stream is cancelled, and the callback is received
+ * 3. the stream succeeded before cancel is effective
+ * 4. the stream is cancelled, and the stream is never started */
if (op_id == OP_ON_COMPLETE &&
!(stream_state->state_callback_received[OP_FAILED] ||
stream_state->state_callback_received[OP_CANCELED] ||
+ stream_state->state_callback_received[OP_SUCCEEDED] ||
!stream_state->state_op_done[OP_SEND_INITIAL_METADATA])) {
CRONET_LOG(GPR_DEBUG, "Because");
result = false;