jai1 commented on a change in pull request #6287: [C++] Fixed triggering timers 
when the connection is being closed
URL: https://github.com/apache/pulsar/pull/6287#discussion_r377399362
 
 

 ##########
 File path: pulsar-client-cpp/lib/ClientConnection.cc
 ##########
 @@ -284,10 +285,14 @@ void 
ClientConnection::startConsumerStatsTimer(std::vector<uint64_t> consumerSta
          it != pendingConsumerStatsMap_.end(); ++it) {
         consumerStatsRequests.push_back(it->first);
     }
-    consumerStatsRequestTimer_->expires_from_now(operationsTimeout_);
-    
consumerStatsRequestTimer_->async_wait(std::bind(&ClientConnection::handleConsumerStatsTimeout,
-                                                     shared_from_this(), 
std::placeholders::_1,
-                                                     consumerStatsRequests));
+
+    DeadlineTimerPtr timer = consumerStatsRequestTimer_;
 
 Review comment:
   Not sure if we need this, since the operations are done under a lock.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to