diff options
author | 2015-05-08 16:38:32 -0700 | |
---|---|---|
committer | 2015-05-08 16:38:32 -0700 | |
commit | 0b488f7649065ad6f00cabbbb617a05dfc7a92e3 (patch) | |
tree | 7a9381245a9913b6123910a531a0d1a20a463a14 /src/core/surface/call.c | |
parent | 2be6095c10353fbcdfbdec50e269775c1a42641d (diff) | |
parent | b8b59b18f2585b602a8c4282ebaf4d5c8bef473a (diff) |
Merge github.com:grpc/grpc into churn-churn-churn-the-api-gently-down-the-stream
Conflicts:
test/cpp/end2end/async_end2end_test.cc
Diffstat (limited to 'src/core/surface/call.c')
-rw-r--r-- | src/core/surface/call.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 9ee91785e8..aa58fa13ed 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -375,18 +375,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); } } @@ -711,6 +703,10 @@ static void call_on_done_recv(void *pc, int success) { break; } } + if (!success) { + grpc_stream_ops_unref_owned_objects(&call->recv_ops.ops[i], + call->recv_ops.nops - i); + } if (call->recv_state == GRPC_STREAM_RECV_CLOSED) { GPR_ASSERT(call->read_state <= READ_STATE_READ_CLOSED); call->read_state = READ_STATE_READ_CLOSED; |