mirror of https://github.com/apache/activemq.git
on close() don't storeState in synchronized block - as it can lead to a deadlock
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@516007 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
da13d596a5
commit
8ad375ff60
|
@ -265,12 +265,14 @@ public final class AsyncDataManager {
|
||||||
return (DataFile) dataFile.getNext();
|
return (DataFile) dataFile.getNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void close() throws IOException{
|
public void close() throws IOException{
|
||||||
if( !started ) {
|
synchronized(this){
|
||||||
|
if(!started){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Scheduler.cancel(cleanupTask);
|
Scheduler.cancel(cleanupTask);
|
||||||
accessorPool.close();
|
accessorPool.close();
|
||||||
|
}
|
||||||
storeState(false);
|
storeState(false);
|
||||||
appender.close();
|
appender.close();
|
||||||
fileMap.clear();
|
fileMap.clear();
|
||||||
|
|
Loading…
Reference in New Issue