diff options
Diffstat (limited to 'src/core/surface/call.c')
-rw-r--r-- | src/core/surface/call.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 647c0ab63c..50df36cae9 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -374,18 +374,10 @@ void grpc_call_internal_unref(grpc_call *c, int allow_immediate_deletion) { static void set_status_code(grpc_call *call, status_source source, gpr_uint32 status) { - int flush; - call->status[source].is_set = 1; call->status[source].code = status; - if (call->is_client) { - flush = status == GRPC_STATUS_CANCELLED; - } else { - flush = status != GRPC_STATUS_OK; - } - - if (flush && !grpc_bbq_empty(&call->incoming_queue)) { + if (status != GRPC_STATUS_OK && !grpc_bbq_empty(&call->incoming_queue)) { grpc_bbq_flush(&call->incoming_queue); } } @@ -1307,3 +1299,5 @@ void grpc_call_context_set(grpc_call *call, grpc_context_index elem, void *value void *grpc_call_context_get(grpc_call *call, grpc_context_index elem) { return call->context[elem]; } + +gpr_uint8 grpc_call_is_client(grpc_call *call) { return call->is_client; } |