You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by gi...@git.apache.org on 2017/07/08 04:50:59 UTC

[GitHub] merlimat commented on a change in pull request #555: CPP Client - Accessing connection_ pointer under a lock

merlimat commented on a change in pull request #555: CPP Client - Accessing connection_ pointer under a lock
URL: https://github.com/apache/incubator-pulsar/pull/555#discussion_r126260187
 
 

 ##########
 File path: pulsar-client-cpp/lib/HandlerBase.cc
 ##########
 @@ -48,11 +48,13 @@ void HandlerBase::start() {
 }
 
 void HandlerBase::grabCnx() {
+    Lock lock(mutex_);
     if (connection_.lock()) {
+        lock.unlock();
 
 Review comment:
   This unlock is not strictly needed. It will get unlocked anyway on the return
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services