michaeljmarshall commented on a change in pull request #12259:
URL: https://github.com/apache/pulsar/pull/12259#discussion_r720555799
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
##########
@@ -875,11 +875,8 @@ protected WriteInEventLoopCallback
newObject(Handle<WriteInEventLoopCallback> ha
ClientCnx cnx = cnx();
if (cnx == null || currentState != State.Ready) {
log.info("[{}] [{}] Closed Producer (not connected)", topic,
producerName);
- synchronized (this) {
- setState(State.Closed);
- client.cleanupProducer(this);
- clearPendingMessagesWhenClose();
- }
+ client.cleanupProducer(this);
Review comment:
I put it in the sync block based on the same reasoning from the
discussion on `setState`.
--
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]