shibd commented on code in PR #317:
URL: https://github.com/apache/pulsar-client-cpp/pull/317#discussion_r1330220533


##########
lib/ClientConnection.cc:
##########
@@ -597,10 +636,15 @@ void ClientConnection::handleResolve(const 
boost::system::error_code& err,
 
 void ClientConnection::readNextCommand() {
     const static uint32_t minReadSize = sizeof(uint32_t);
+    auto weakSelf = weak_from_this();
     asyncReceive(
         incomingBuffer_.asio_buffer(),
-        customAllocReadHandler(std::bind(&ClientConnection::handleRead, 
shared_from_this(),

Review Comment:
   Ok, I agree to use `lambda` instead of `std::bind`.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to