summaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/main/java')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java
index 2e8218a99..57c547b8c 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/engdep/EngDepMessageListener.java
@@ -77,7 +77,7 @@ public class EngDepMessageListener implements MessageListener<Message>, Runnable
// The message listener thread and stopping flag
private Thread messageListenerThread;
- private boolean stopOrderedFlag = false;
+ private volatile boolean stopOrderedFlag = false;
// The message queue is used to hold messages prior to forwarding to Apex
private final BlockingQueue<MessageBlock<Message>> messageQueue = new LinkedBlockingDeque<>();
@@ -149,7 +149,7 @@ public class EngDepMessageListener implements MessageListener<Message>, Runnable
@Override
public void run() {
// Take messages off the queue and forward them to the Apex engine
- while (messageListenerThread.isAlive() && !stopOrderedFlag) {
+ while (!stopOrderedFlag) {
pollAndHandleMessage();
}
}