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


##########
lib/ConsumerImpl.cc:
##########
@@ -1186,6 +1186,7 @@ void ConsumerImpl::closeAsync(ResultCallback 
originalCallback) {
     if (ackGroupingTrackerPtr_) {
         ackGroupingTrackerPtr_->close();
     }
+    negativeAcksTracker_.close();

Review Comment:
   These two invoke scenarios are not the same:
   
   - `consumer.close()`: This must be closed before sending the 
`newCloseConsumer` command to prevent the `tracker` from sending useless 
requests.
   - `consumer.shutdown()`: In addition to the method called by consumer.close, 
the destructor also calls this method. Such as: when the consumer 
`subscription` fails, the consumer object destruction is triggered, and the 
`tracker` needs to be closed. 
   
   This one is similar to this issue: 
https://github.com/apache/pulsar-client-cpp/pull/185



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