mirror of https://github.com/apache/activemq.git
[AMQ-9376] Fix ConcurrentModificationException during a destroy()
(cherry picked from commit 19696254dd
)
This commit is contained in:
parent
96843d6c3f
commit
46667fbce1
|
@ -22,6 +22,7 @@ import java.util.Enumeration;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.activemq.broker.BrokerService;
|
||||
import org.apache.activemq.spring.SpringBrokerContext;
|
||||
|
@ -182,7 +183,8 @@ public class ActiveMQServiceFactory implements ManagedServiceFactory {
|
|||
}
|
||||
|
||||
synchronized public void destroy() {
|
||||
for (String broker : brokers.keySet()) {
|
||||
Set<String> tmpBrokersSet = brokers.keySet();
|
||||
for (String broker : tmpBrokersSet) {
|
||||
deleted(broker);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue