AMQ-1950 - fix for slave hang with temp queue creation/deletion

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@700823 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary Tully 2008-10-01 16:15:53 +00:00
parent 4d6043aa94
commit c48c23f47c
1 changed files with 4 additions and 4 deletions

View File

@ -245,13 +245,13 @@ public class Queue extends BaseDestination implements Task {
if( sub instanceof QueueBrowserSubscription ) {
((QueueBrowserSubscription)sub).incrementQueueRef();
}
if (!this.optimizedDispatch) {
if (!(this.optimizedDispatch || isSlave())) {
wakeup();
}
}finally {
dispatchLock.unlock();
}
if (this.optimizedDispatch) {
if (this.optimizedDispatch || isSlave()) {
// Outside of dispatchLock() to maintain the lock hierarchy of
// iteratingMutex -> dispatchLock. - see https://issues.apache.org/activemq/browse/AMQ-1878
wakeup();
@ -307,13 +307,13 @@ public class Queue extends BaseDestination implements Task {
if (consumers.isEmpty()) {
messages.gc();
}
if (!this.optimizedDispatch) {
if (!(this.optimizedDispatch || isSlave())) {
wakeup();
}
}finally {
dispatchLock.unlock();
}
if (this.optimizedDispatch) {
if (this.optimizedDispatch || isSlave()) {
// Outside of dispatchLock() to maintain the lock hierarchy of
// iteratingMutex -> dispatchLock. - see https://issues.apache.org/activemq/browse/AMQ-1878
wakeup();