You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/23 15:41:42 UTC

[GitHub] [pulsar] shibd commented on a diff in pull request #17239: [fix][cpp] Fix multi-topics consumer close segmentation fault

shibd commented on code in PR #17239:
URL: https://github.com/apache/pulsar/pull/17239#discussion_r952793882


##########
pulsar-client-cpp/lib/MultiTopicsConsumerImpl.cc:
##########
@@ -364,13 +366,47 @@ void MultiTopicsConsumerImpl::closeAsync(ResultCallback callback) {
 
     state_ = Closing;
 
-    auto self = shared_from_this();
+    std::weak_ptr<MultiTopicsConsumerImpl> weakSelf{shared_from_this()};

Review Comment:
   Why here use weak ptr?



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org