This closes #2894
This commit is contained in:
commit
6c33a48c15
|
@ -2969,6 +2969,11 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
|||
private void depage(final boolean scheduleExpiry) {
|
||||
depagePending = false;
|
||||
|
||||
if (!depageLock.tryLock()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
synchronized (this) {
|
||||
if (isPaused() || pageIterator == null) {
|
||||
return;
|
||||
|
@ -3023,6 +3028,9 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
|||
// This will just call an executor
|
||||
expireReferences();
|
||||
}
|
||||
} finally {
|
||||
depageLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
private void internalAddRedistributor(final ArtemisExecutor executor) {
|
||||
|
@ -3888,13 +3896,10 @@ public class QueueImpl extends CriticalComponentImpl implements Queue {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
depageLock.lock();
|
||||
try {
|
||||
depage(scheduleExpiry);
|
||||
} catch (Exception e) {
|
||||
ActiveMQServerLogger.LOGGER.errorDelivering(e);
|
||||
} finally {
|
||||
depageLock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue