eolivelli commented on a change in pull request #11347:
URL: https://github.com/apache/pulsar/pull/11347#discussion_r672192097
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -926,7 +925,7 @@ public void connectionFailed(PulsarClientException
exception) {
} else {
ByteBuf cmd = Commands.newCloseConsumer(consumerId, requestId);
cnx.sendRequestWithId(cmd, requestId).handle((v, exception) -> {
- boolean ignoreException = !cnx.ctx().channel().isActive();
+ boolean ignoreException = cnx.ctx() == null ||
!cnx.ctx().channel().isActive();
Review comment:
it looks like this is the fix.
if the result of` cnx.ctx()` may be different from one call to the second
call I suggest you to capture the value once
```
ctx = cnx.ctx();
boolean ignoreException = ctx == null || !ctx.channel().isActive()
```
--
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]