diff options
author | 2018-10-09 13:03:09 -0400 | |
---|---|---|
committer | 2018-10-09 13:03:09 -0400 | |
commit | b913c3d3bd3eadf4e5a16d006f220272c7426bd9 (patch) | |
tree | 2410b3f5a446ebe5b726f0ad04d455fbaf608ee5 /ueb-listener/src/main | |
parent | d15fd7eeb0237bacfa8db4474bfa761235e32bc0 (diff) |
Fix UEB client error handling
Changed ueb-listener to retry start of client if it returns failure
Change-Id: Ieda78615a38925824cb78d63939da00818bf4452
Issue-ID: SDNC-472
Signed-off-by: Timoney, Dan (dt5972) <dtimoney@att.com>
Diffstat (limited to 'ueb-listener/src/main')
-rw-r--r-- | ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java index d37518f1b..c025f3b05 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebClient.java @@ -27,6 +27,7 @@ import org.onap.sdc.impl.DistributionClientFactory; import org.onap.sdc.utils.DistributionActionResultEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.onap.sdc.utils.DistributionActionResultEnum; public class SdncUebClient { @@ -61,7 +62,12 @@ public class SdncUebClient { try { IDistributionClientResult start = client.start(); LOG.info("Client startup result = {}", start.getDistributionMessageResult()); - keepWaiting = false; + + // Only stop waiting if the result is success + if (start.getDistributionActionResult() == DistributionActionResultEnum.SUCCESS) { + + keepWaiting = false; + } } catch(Exception e) { LOG.info("Client startup failure", e); } |