aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Vijay Pai <vpai@google.com>2017-06-22 13:41:41 -0700
committerGravatar Vijay Pai <vpai@google.com>2017-06-22 13:41:41 -0700
commit10c040d455289b274fe2c5de00a9ffeb79798681 (patch)
treec23973f64fb3224dbd1d2c33f675b6a8f3023b5c
parentd35730d18564a00a4b9acccaf8387ccb4bb565b8 (diff)
Move collection reset before unref (since unref could destroy obj)
-rw-r--r--include/grpc++/impl/codegen/call.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h
index dba53bc427..342ea46203 100644
--- a/include/grpc++/impl/codegen/call.h
+++ b/include/grpc++/impl/codegen/call.h
@@ -610,10 +610,12 @@ class CallOpSet : public CallOpSetInterface,
this->Op5::FinishOp(status);
this->Op6::FinishOp(status);
*tag = return_tag_;
- g_core_codegen_interface->grpc_call_unref(call_);
+
// TODO(vjpai): Remove the reference to collection_ once the idea of
// bypassing the code generator is forbidden. It is already deprecated
collection_.reset();
+
+ g_core_codegen_interface->grpc_call_unref(call_);
return true;
}