diff options
author | 2016-06-13 18:10:23 -0700 | |
---|---|---|
committer | 2016-06-13 18:10:23 -0700 | |
commit | ec066b3d32ed484961cd73e84822455da4f65ca3 (patch) | |
tree | 30ee6d5da8d85aba4beef66a85f8865b6b2475de /src/core/lib/channel/channel_stack.c | |
parent | a47acad040242c03d5e812a40fd11225f327d45e (diff) |
Add http2 status code in error_message if it's not 200
Diffstat (limited to 'src/core/lib/channel/channel_stack.c')
-rw-r--r-- | src/core/lib/channel/channel_stack.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index bbba85d80b..b52b1af83a 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -266,3 +266,14 @@ void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, op.cancel_with_status = GRPC_STATUS_CANCELLED; grpc_call_next_op(exec_ctx, cur_elem, &op); } + +void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, + grpc_call_element *cur_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); +} |