Start cancellations at the current filter instead of the next one.

pull/7970/head
Mark D. Roth 9 years ago
parent 72f6da8bac
commit dabb376f50
  1. 8
      src/core/lib/channel/channel_stack.c

@ -271,20 +271,20 @@ grpc_call_stack *grpc_call_stack_from_top_element(grpc_call_element *elem) {
}
void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx,
grpc_call_element *cur_elem) {
grpc_call_element *elem) {
grpc_transport_stream_op op;
memset(&op, 0, sizeof(op));
op.cancel_error = GRPC_ERROR_CANCELLED;
grpc_call_next_op(exec_ctx, cur_elem, &op);
elem->filter->start_transport_stream_op(exec_ctx, elem, &op);
}
void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx,
grpc_call_element *cur_elem,
grpc_call_element *elem,
grpc_status_code status,
gpr_slice *optional_message) {
grpc_transport_stream_op op;
memset(&op, 0, sizeof(op));
grpc_transport_stream_op_add_cancellation_with_message(&op, status,
optional_message);
grpc_call_next_op(exec_ctx, cur_elem, &op);
elem->filter->start_transport_stream_op(exec_ctx, elem, &op);
}

Loading…
Cancel
Save