aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-06-20 10:09:21 -0400
committerJim Hahn <jrh3@att.com>2019-06-20 11:00:24 -0400
commit1bf858e215f8d0b8cf074bffc81d1c3d1a03fd52 (patch)
treed43a6f8c5587d17148d82fc35b2e6e2d34134bd2 /controlloop/common/eventmanager/src/main
parentd4704a70405cae2f6d9cb32ca30828db14be01b7 (diff)
Set timeout to CL timeout if zero
Modified the rules to set the operational timeout to the overall CL timeout if the operational timeout is zero. Added code to check for zero timeout for the overall CL, too. Change-Id: I28d41632f59e9bc2fce953267883d567abc92a49 Issue-ID: POLICY-1859 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/main')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
index 7811b2d73..b82a5f8e5 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManager.java
@@ -666,7 +666,10 @@ public class ControlLoopEventManager implements LockCallback, Serializable {
*/
public int getControlLoopTimeout(Integer defaultTimeout) {
if (this.processor != null && this.processor.getControlLoop() != null) {
- return this.processor.getControlLoop().getTimeout();
+ Integer timeout = this.processor.getControlLoop().getTimeout();
+ if (timeout != null && timeout > 0) {
+ return timeout;
+ }
}
if (defaultTimeout != null) {
return defaultTimeout;