aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/channel
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-06-29 22:42:33 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-06-29 22:42:33 -0700
commit49924e0e62d29499874e93f5dcf5976edcf610f4 (patch)
treee0ed5306462b9e38a5887b4389da3f20eb2b1ecb /src/core/channel
parentff3ae687e1e85d4fb29024c20a17595dce05e51f (diff)
Better handling of cancellation, uri parse errors, and disconnection
Diffstat (limited to 'src/core/channel')
-rw-r--r--src/core/channel/client_channel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c
index d465a970b9..e62a262bab 100644
--- a/src/core/channel/client_channel.c
+++ b/src/core/channel/client_channel.c
@@ -242,6 +242,7 @@ static void perform_transport_stream_op(grpc_call_element *elem, grpc_transport_
channel_data *chand = elem->channel_data;
grpc_subchannel_call *subchannel_call;
grpc_lb_policy *lb_policy;
+ grpc_transport_stream_op op2;
GPR_ASSERT(elem->filter == &grpc_client_channel_filter);
GRPC_CALL_LOG_OP(GPR_INFO, elem, op);
@@ -263,8 +264,11 @@ static void perform_transport_stream_op(grpc_call_element *elem, grpc_transport_
if (!continuation) {
if (op->cancel_with_status != GRPC_STATUS_OK) {
calld->state = CALL_CANCELLED;
+ op2 = calld->waiting_op;
+ memset(&calld->waiting_op, 0, sizeof(calld->waiting_op));
gpr_mu_unlock(&calld->mu_state);
handle_op_after_cancellation(elem, op);
+ handle_op_after_cancellation(elem, &op2);
} else {
GPR_ASSERT((calld->waiting_op.send_ops == NULL) !=
(op->send_ops == NULL));