Shoothzj commented on a change in pull request #11347:
URL: https://github.com/apache/pulsar/pull/11347#discussion_r672255093



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
##########
@@ -1968,9 +1965,7 @@ public boolean hasMessageAvailable() throws 
PulsarClientException {
     }
 
     private void 
completehasMessageAvailableWithValue(CompletableFuture<Boolean> future, boolean 
value) {
-        internalPinnedExecutor.execute(() -> {
-            future.complete(value);
-        });
+        internalPinnedExecutor.execute(() -> future.complete(value));

Review comment:
       reverted

##########
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:
       You are definitely right! Thank you very much.




-- 
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]


Reply via email to