diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-04-28 22:36:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-04-28 22:36:50 +0000 |
commit | 0f4acdbe709ec9e96e3984cc4541bce0b4096d4e (patch) | |
tree | 692430af50a74c80783c87cc0869eee1c600e31a /main | |
parent | abe27edd504aa5405520452f3056a790863fc77c (diff) | |
parent | 248e0619a89f27f5d8111adb8743e72d1b11e010 (diff) |
Merge "PAP erroneously undeploying policies"
Diffstat (limited to 'main')
-rw-r--r-- | main/src/main/java/org/onap/policy/pap/main/comm/PdpRequests.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/comm/PdpRequests.java b/main/src/main/java/org/onap/policy/pap/main/comm/PdpRequests.java index 6a539a46..53d3fbbd 100644 --- a/main/src/main/java/org/onap/policy/pap/main/comm/PdpRequests.java +++ b/main/src/main/java/org/onap/policy/pap/main/comm/PdpRequests.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP PAP * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,8 +50,8 @@ public class PdpRequests { /** * Queue of requests to be published. The first item in the queue is currently being - * published. Currently, there will be at most three messages in the queue: PASSIVE, - * ACTIVE, and UPDATE. + * published. Currently, there will be at most four messages in the queue: the request + * being worked, one PASSIVE request, one ACTIVE, and one UPDATE. */ private final Queue<Request> requests = new ArrayDeque<>(3); @@ -80,9 +80,12 @@ public class PdpRequests { } // try to reconfigure an existing request with the new message + // + // don't reconfigure the first request PdpMessage newMessage = request.getMessage(); + int count = 0; for (Request req : requests) { - if (req.reconfigure(newMessage)) { + if (count++ > 0 && req.reconfigure(newMessage)) { return; } } |