shibd commented on code in PR #17239:
URL: https://github.com/apache/pulsar/pull/17239#discussion_r952805482
##########
pulsar-client-cpp/lib/MultiTopicsConsumerImpl.cc:
##########
@@ -86,11 +86,14 @@ void
MultiTopicsConsumerImpl::handleOneTopicSubscribed(Result result, Consumer c
if (result != ResultOk) {
state_ = Failed;
+ // Use the first failed result
+ auto expectedResult = ResultOk;
+ failedResult.compare_exchange_strong(expectedResult, result);
Review Comment:
Why is `failedResult` a member variable, can you directly set the `result`
to line 107? I haven't seen `failedResult` used elsewhere.
--
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]