From a7170ac4ad04591a5db33d5271ef6ce30662e9fd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 2 Feb 2015 14:43:09 -0800 Subject: [PATCH] Get the recv close edge right --- src/core/surface/call.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/surface/call.c b/src/core/surface/call.c index a8be3db7281..96cdb9651b2 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -622,9 +622,13 @@ static grpc_call_error start_ioreq(grpc_call *call, const grpc_ioreq *reqs, } break; case GRPC_IOREQ_RECV_STATUS: - case GRPC_IOREQ_RECV_CLOSE: if (call->read_closed) { - finish_ioreq_op(call, op, GRPC_OP_OK); + finish_ioreq_op(call, GRPC_IOREQ_RECV_STATUS, GRPC_OP_OK); + } + break; + case GRPC_IOREQ_RECV_CLOSE: + if (call->stream_closed) { + finish_ioreq_op(call, GRPC_IOREQ_RECV_CLOSE, GRPC_OP_OK); } break; case GRPC_IOREQ_SEND_CLOSE: