BewareMyPower commented on code in PR #16940:
URL: https://github.com/apache/pulsar/pull/16940#discussion_r943352821
##########
pulsar-client-cpp/lib/ProducerImpl.cc:
##########
@@ -176,14 +172,14 @@ void ProducerImpl::handleCreateProducer(const
ClientConnectionPtr& cnx, Result r
// make sure we're still in the Pending/Ready state, closeAsync could have
been invoked
// while waiting for this response if using lazy producers
- Lock lock(mutex_);
if (state_ != Ready && state_ != Pending) {
Review Comment:
```suggestion
const auto state = state_.load();
if (state != Ready && state != Pending) {
```
--
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]