Procházet zdrojové kódy

Unref the call first in case the collection is still used in call

yang-g před 8 roky
rodič
revize
0d9caecde2
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      include/grpc++/impl/codegen/call.h

+ 2 - 1
include/grpc++/impl/codegen/call.h

@@ -611,11 +611,12 @@ class CallOpSet : public CallOpSetInterface,
     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;
   }