Adding lock and reset call_ in ~ClientContext to avoid race condition (#30270)

* Adding lock and reset call_ in ~ClientContext to avoid race condition

* Remove lock in ~ClientContext
pull/30470/head
Mao 2 years ago committed by GitHub
parent 094cc94bc6
commit 756498e157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      src/cpp/client/client_context.cc

@ -79,6 +79,7 @@ ClientContext::ClientContext()
ClientContext::~ClientContext() {
if (call_) {
grpc_call_unref(call_);
call_ = nullptr;
}
g_client_callbacks->Destructor(this);
}

Loading…
Cancel
Save