diff options
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java | 6 | ||||
-rw-r--r-- | version.properties | 2 |
3 files changed, 6 insertions, 4 deletions
@@ -26,7 +26,7 @@ <groupId>org.onap.dcaegen2.services</groupId> <artifactId>pm-mapper</artifactId> - <version>1.4.1-SNAPSHOT</version> + <version>1.4.2-SNAPSHOT</version> <parent> <groupId>org.onap.oparent</groupId> diff --git a/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java b/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java index 9938eed..4993a10 100644 --- a/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java +++ b/src/main/java/org/onap/dcaegen2/services/pmmapper/utils/RequestSender.java @@ -100,6 +100,9 @@ public class RequestSender { int attempts = 1;
try {
while (!status && attempts <= MAX_RETRIES) {
+ if(attempts != 1) {
+ Thread.sleep(RETRY_INTERVAL);
+ }
final URL url = new URL(urlString);
final HttpURLConnection connection = getHttpURLConnection(method, url, invocationID, requestID);
@@ -117,7 +120,6 @@ public class RequestSender { result = getResult(attempts, connection);
status = !isWithinErrorRange(connection.getResponseCode());
attempts++;
- Thread.sleep(RETRY_INTERVAL);
}
} catch (IOException | NoSuchAlgorithmException ex) {
logger.unwrap().warn("Request failure", ex);
@@ -173,4 +175,4 @@ public class RequestSender { }
return result;
}
-}
\ No newline at end of file +}
diff --git a/version.properties b/version.properties index f352992..6494452 100644 --- a/version.properties +++ b/version.properties @@ -1,6 +1,6 @@ major=1 minor=4 -patch=1 +patch=2 base_version=${major}.${minor}.${patch} release_version=${base_version} snapshot_version=${base_version}-SNAPSHOT |