mirror of https://github.com/apache/activemq.git
- Faster VMTransport shutdown by avoiding a potential deadlock
- Better connection shutdown. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@561180 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f90c62c640
commit
5ad4732038
|
@ -930,6 +930,7 @@ public class TransportConnection implements Service,Connection,Task,CommandVisit
|
|||
// from the broker.
|
||||
|
||||
if (!broker.isStopped()) {
|
||||
connectionStates=listConnectionStates();
|
||||
for (TransportConnectionState cs : connectionStates) {
|
||||
cs.getContext().getStopping().set(true);
|
||||
try {
|
||||
|
|
|
@ -168,16 +168,20 @@ public class VMTransport implements Transport,Task{
|
|||
}
|
||||
|
||||
public void stop() throws Exception{
|
||||
TaskRunner tr=null;
|
||||
synchronized(mutex) {
|
||||
if(!disposed){
|
||||
started=false;
|
||||
disposed=true;
|
||||
if(taskRunner!=null){
|
||||
taskRunner.shutdown(1000);
|
||||
tr = taskRunner;
|
||||
taskRunner=null;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( tr !=null ) {
|
||||
tr.shutdown(1000);
|
||||
}
|
||||
}
|
||||
|
||||
public Object narrow(Class target){
|
||||
|
|
Loading…
Reference in New Issue