mirror of https://github.com/apache/activemq.git
Fix concurrent modification of pagedInMessages
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@634472 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9cc2d3776e
commit
f4ca650108
|
@ -276,7 +276,12 @@ public class Queue extends BaseDestination implements Task {
|
|||
sub.remove(context, this);
|
||||
|
||||
List<QueueMessageReference> list = new ArrayList<QueueMessageReference>();
|
||||
for (QueueMessageReference node:pagedInMessages.values()){
|
||||
List<QueueMessageReference> inFlight = null;
|
||||
synchronized(pagedInMessages) {
|
||||
inFlight = new ArrayList<QueueMessageReference>(pagedInMessages.values());
|
||||
}
|
||||
|
||||
for (QueueMessageReference node:inFlight){
|
||||
if (!node.isDropped() && !node.isAcked()
|
||||
&& node.getLockOwner() == sub) {
|
||||
if (node.unlock()) {
|
||||
|
|
Loading…
Reference in New Issue