From 4d064019fe9f68f491ec3ef3ea79aee9388e1917 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 31 Mar 2017 08:27:28 -0700 Subject: [PATCH] Call ref/unref, bugfixes --- ext/call.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/call.cc b/ext/call.cc index 244546d3..88bcd6db 100644 --- a/ext/call.cc +++ b/ext/call.cc @@ -520,7 +520,7 @@ Call::Call(grpc_call *call) : wrapped_call(call), Call::~Call() { if (wrapped_call != NULL) { - grpc_call_destroy(wrapped_call); + grpc_call_unref(wrapped_call); } } @@ -568,7 +568,7 @@ void Call::CompleteBatch(bool is_final_op) { } this->pending_batches--; if (this->has_final_op_completed && this->pending_batches == 0) { - grpc_call_destroy(this->wrapped_call); + grpc_call_unref(this->wrapped_call); this->wrapped_call = NULL; } }