https://issues.apache.org/jira/browse/AMQ-4361 - implement suggestion from Sam hendley with thanks, avoid the IllegalMonitorStateException

This commit is contained in:
gtully 2015-10-22 15:49:44 +01:00
parent 6f524bfea0
commit 9ddd162d25
1 changed files with 1 additions and 1 deletions

View File

@ -74,9 +74,9 @@ public class MemoryUsage extends Usage<MemoryUsage> {
while (percentUsage >= 100 && isStarted()) {
waitForSpaceCondition.await();
}
usageLock.readLock().lock();
} finally {
usageLock.writeLock().unlock();
usageLock.readLock().lock();
}
}