mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@666607 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
58e5b9acce
commit
32364744ee
|
@ -311,13 +311,18 @@ public abstract class AbstractRegion implements Region {
|
|||
if (sub != null) {
|
||||
|
||||
// remove the subscription from all the matching queues.
|
||||
List<Destination> removeList = new ArrayList<Destination>();
|
||||
synchronized (destinationsMutex) {
|
||||
for (Iterator iter = destinationMap.get(info.getDestination())
|
||||
.iterator(); iter.hasNext();) {
|
||||
Destination dest = (Destination) iter.next();
|
||||
dest.removeSubscription(context, sub);
|
||||
removeList.add(dest);
|
||||
|
||||
}
|
||||
}
|
||||
for(Destination dest:removeList) {
|
||||
dest.removeSubscription(context, sub);
|
||||
}
|
||||
|
||||
destroySubscription(sub);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue