activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r379557 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Date Tue, 21 Feb 2006 18:23:09 GMT
Author: rajdavies
Date: Tue Feb 21 10:23:06 2006
New Revision: 379557

URL: http://svn.apache.org/viewcvs?rev=379557&view=rev
Log:
don't throw an exception if the transport is disposed

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?rev=379557&r1=379556&r2=379557&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Tue Feb 21 10:23:06 2006
@@ -22,7 +22,6 @@
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.Random;
-
 import org.apache.activemq.command.BrokerInfo;
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.Response;
@@ -40,7 +39,6 @@
 import org.apache.activemq.util.ServiceSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
 import edu.emory.mathcs.backport.java.util.concurrent.CopyOnWriteArrayList;
 
@@ -374,9 +372,13 @@
             // Some one may be trying to stop our thread.
             throw new InterruptedIOException();
         }
-        if( error instanceof IOException )
-            throw (IOException)error;
-        throw IOExceptionSupport.create(error);
+        if(!disposed){
+            if(error!=null){
+                if(error instanceof IOException)
+                    throw (IOException) error;
+                throw IOExceptionSupport.create(error);
+            }
+        }
     }
 
     public FutureResponse asyncRequest(Command command) throws IOException {



Mime
View raw message