You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/03/08 12:47:12 UTC
svn commit: r384189 -
/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Author: jstrachan
Date: Wed Mar 8 03:47:09 2006
New Revision: 384189
URL: http://svn.apache.org/viewcvs?rev=384189&view=rev
Log:
allow the transport to be closed before we try and send remove commands to it without generating an exception
Modified:
incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java?rev=384189&r1=384188&r2=384189&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java (original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/TransportThreadSupport.java Wed Mar 8 03:47:09 2006
@@ -17,6 +17,7 @@
package org.apache.activemq.transport;
import org.apache.activemq.command.Command;
+import org.apache.activemq.command.RemoveInfo;
import org.apache.activemq.command.ShutdownInfo;
import org.apache.activemq.util.ServiceStopper;
@@ -86,7 +87,7 @@
protected void checkStarted(Command command) throws IOException {
if (!isStarted()) {
// we might try to shut down the transport before it was ever started in some test cases
- if (!(command instanceof ShutdownInfo)) {
+ if (!(command instanceof ShutdownInfo || command instanceof RemoveInfo)) {
throw new IOException("The transport " + this + " of type: " + getClass().getName() + " is not running.");
}
}