1
0
Fork 0

HttpClient used in metadata collection retries on 502, 503, 504

This commit is contained in:
Claudio Atzori 2021-06-28 09:34:30 +02:00
parent 67afd06cd1
commit af42377d0e
1 changed files with 2 additions and 1 deletions

View File

@ -142,9 +142,10 @@ public class HttpConnector2 {
throw new CollectorException("4xx error: request will not be repeated. " + report);
}
if (is5xx(urlConn.getResponseCode())) {
// SERVER SIDE ERRORS RETRY ONLY on 503
switch (urlConn.getResponseCode()) {
case HttpURLConnection.HTTP_BAD_GATEWAY:
case HttpURLConnection.HTTP_UNAVAILABLE:
case HttpURLConnection.HTTP_GATEWAY_TIMEOUT:
if (retryAfter > 0) {
log
.warn(