MarvinCai commented on a change in pull request #10028:
URL: https://github.com/apache/pulsar/pull/10028#discussion_r602474288



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
##########
@@ -669,18 +675,105 @@ public void close() throws PulsarClientException {
     @Override
     public void shutdown() throws PulsarClientException {
         try {
-            lookup.close();
-            cnxPool.close();
-            timer.stop();
-            externalExecutorProvider.shutdownNow();
-            internalExecutorService.shutdownNow();
-            conf.getAuthentication().close();

Review comment:
       @abhilashmandaliya Sorry I missed that, in some case the eventloopgroup 
is passed in when constructing the PulsarClient, so it's not a resource created 
and owned by the PulsarClient and it might be used somewhere else. So 
PulsarClient shouldn't just shut it down when closing itself which might break 
other component using that same eventloopgroup. So we should check if the 
eventloopgroup is created by this PulsarClient before trying to shut it down, I 
think a simple boolean flag should be enough.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to