mirror of https://github.com/apache/activemq.git
avoid java.util.concurrent.RejectedExecutionException on shutdown by bracketing executor usage with started flag
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@832401 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8e42528bb2
commit
7f46be934a
|
@ -471,7 +471,7 @@ public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable {
|
|||
}
|
||||
|
||||
private void fireServiceRemovedEvent(RemoteBrokerData data) {
|
||||
if (discoveryListener != null) {
|
||||
if (discoveryListener != null && started.get()) {
|
||||
final DiscoveryEvent event = new DiscoveryEvent(data.service);
|
||||
event.setBrokerName(data.brokerName);
|
||||
|
||||
|
@ -490,7 +490,7 @@ public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable {
|
|||
}
|
||||
|
||||
private void fireServiceAddEvent(RemoteBrokerData data) {
|
||||
if (discoveryListener != null) {
|
||||
if (discoveryListener != null && started.get()) {
|
||||
final DiscoveryEvent event = new DiscoveryEvent(data.service);
|
||||
event.setBrokerName(data.brokerName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue