mirror of https://github.com/apache/activemq.git
allow the transport to be closed before we try and send remove commands to it without generating an exception
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@384189 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dba3ea8d0e
commit
534ea690ff
|
@ -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 @@ public abstract class TransportThreadSupport extends TransportSupport implements
|
|||
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.");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue