You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/29 14:06:26 UTC

[GitHub] [pulsar] abhilashmandaliya commented on a change in pull request #10441: Using ObjectMapper instead of Gson to parse Source/SInk configuration

abhilashmandaliya commented on a change in pull request #10441:
URL: https://github.com/apache/pulsar/pull/10441#discussion_r623086334



##########
File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
##########
@@ -764,8 +763,18 @@ public void shutdown() throws PulsarClientException {
         }
     }
 
+    private void closeConnectionPool(ConnectionPool cnxPool) throws PulsarClientException {
+        if (createdCnxPool && cnxPool != null) {
+            try {
+                cnxPool.close();
+            } catch (Throwable t) {
+                throw PulsarClientException.unwrap(t);
+            }
+        }
+    }
+
     private void shutdownEventLoopGroup(EventLoopGroup eventLoopGroup) throws PulsarClientException {
-        if (createdEventLoopGroup && !eventLoopGroup.isShutdown()) {
+        if (createdEventLoopGroup && eventLoopGroup != null && !eventLoopGroup.isShutdown()) {

Review comment:
       this was throwing an exception when this method was called from constructor if the exception was thrown before assigning parameter passed eventLoopGroup to the member variable eventLoopGroup. The same is for the cnxPool.




-- 
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:
users@infra.apache.org