pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] merlimat commented on a change in pull request #2640: [tests] Issue 2639: NullPointerException at closing consumer
Date Sun, 23 Sep 2018 14:38:15 GMT
merlimat commented on a change in pull request #2640: [tests] Issue 2639: NullPointerException
at closing consumer
URL: https://github.com/apache/pulsar/pull/2640#discussion_r219701014
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -693,6 +693,11 @@ public void connectionFailed(PulsarClientException exception) {
 
         CompletableFuture<Void> closeFuture = new CompletableFuture<>();
         ClientCnx cnx = cnx();
+        if (null == cnx) {
 
 Review comment:
   There are few cleanup operations to complete when the "close" is done, perhaps the part
at line  704-713 can be extracted into a method.
   
   Also, `cmd` should be created after this check, to avoid leaking it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message