From f76069a593884b1f580bd8568678c67ce860ee45 Mon Sep 17 00:00:00 2001 From: Ara Ayvazyan Date: Fri, 30 Mar 2018 10:44:43 -0700 Subject: [PATCH] fixup! Fix the payload ownership issue --- include/grpcpp/impl/codegen/server_interface.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/grpcpp/impl/codegen/server_interface.h b/include/grpcpp/impl/codegen/server_interface.h index 1149aa65934..70c90681f00 100644 --- a/include/grpcpp/impl/codegen/server_interface.h +++ b/include/grpcpp/impl/codegen/server_interface.h @@ -186,7 +186,11 @@ class ServerInterface : public internal::CallHook { notification_cq_(notification_cq), tag_(tag), request_(request) { - IssueRequest(registered_method, payload_.bbuf_ptr(), notification_cq); + IssueRequest(registered_method, payload_.c_buffer_ptr(), notification_cq); + } + + ~PayloadAsyncRequest() { + payload_.Release(); // We do not own the payload_ } bool FinalizeResult(void** tag, bool* status) override {