From 23f39363c458bffc361f80182c4581b3af77cd9b Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 25 Feb 2019 00:01:16 -0800 Subject: [PATCH] Inproc: properly handle send message that won't go to other side --- src/core/ext/transport/inproc/inproc_transport.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index b0f93eb63f4..d46c24a1de0 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -1032,6 +1032,11 @@ void perform_stream_op(grpc_transport* gt, grpc_stream* gs, } } else { if (error != GRPC_ERROR_NONE) { + // Consume any send message that was sent here but that we are not pushing + // to the other side + if (op->send_message) { + op->payload->send_message.send_message.reset(); + } // Schedule op's closures that we didn't push to op state machine if (op->recv_initial_metadata) { if (op->payload->recv_initial_metadata.trailing_metadata_available !=