This is an automated email from the ASF dual-hosted git repository.

tabish pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/main by this push:
     new c71a1644bf ARTEMIS-5147 eliminate unnecessary check
c71a1644bf is described below

commit c71a1644bf2e55249c4045e856307c3c48c08cb7
Author: Justin Bertram <[email protected]>
AuthorDate: Thu Jan 16 14:30:14 2025 -0600

    ARTEMIS-5147 eliminate unnecessary check
    
    The `transportConnection` variable will always be `null` so there's no
    use in checking it.
---
 .../artemis/core/client/impl/ClientSessionFactoryImpl.java    | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
index 4223e3c0b6..edc4bf6f4f 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.client.impl;
 
+import java.lang.invoke.MethodHandles;
 import java.lang.ref.WeakReference;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -31,6 +32,7 @@ import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
+import java.util.function.BiPredicate;
 
 import org.apache.activemq.artemis.api.config.ServerLocatorConfig;
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
@@ -75,8 +77,6 @@ import 
org.apache.activemq.artemis.utils.actors.OrderedExecutorFactory;
 import org.apache.activemq.artemis.utils.collections.ConcurrentHashSet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import java.lang.invoke.MethodHandles;
-import java.util.function.BiPredicate;
 
 public class ClientSessionFactoryImpl implements ClientSessionFactoryInternal, 
ClientConnectionLifeCycleListener {
 
@@ -1291,13 +1291,6 @@ public class ClientSessionFactoryImpl implements 
ClientSessionFactoryInternal, C
 
          ActiveMQClientLogger.LOGGER.createConnectorException(cause);
 
-         if (transportConnection != null) {
-            try {
-               transportConnection.close();
-            } catch (Throwable t) {
-            }
-         }
-
          if (connector != null) {
             try {
                connector.close();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to