activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r382960 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Date Fri, 03 Mar 2006 23:16:56 GMT
Author: chirino
Date: Fri Mar  3 15:16:53 2006
New Revision: 382960

URL: http://svn.apache.org/viewcvs?rev=382960&view=rev
Log:
No need to clean up connection if it's being closed.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java?rev=382960&r1=382959&r2=382960&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/ActiveMQConnection.java
Fri Mar  3 15:16:53 2006
@@ -1580,12 +1580,13 @@
     
     protected void transportFailed(Throwable error){
         transportFailed.set(true);
-        try{
-            cleanup();
-        }catch(JMSException e){
-           log.warn("Cleanup failed",e);
+        if (!closed.get() && !closing.get()) {
+            try{
+                cleanup();
+            }catch(JMSException e){
+               log.warn("Cleanup failed",e);
+            }
         }
-        
     }
 
     public void setCopyMessageOnSend(boolean copyMessageOnSend) {



Mime
View raw message