1
0
Fork 0

the metadata collection plugins using the HttpConnector2 class shall now retry instead of failing in case of UnknownHostException

This commit is contained in:
Claudio Atzori 2024-08-05 16:55:07 +02:00
parent 6a097abc89
commit 535a7b99f1
1 changed files with 2 additions and 2 deletions

View File

@ -212,11 +212,11 @@ public class HttpConnector2 {
.format(
"Unexpected status code: %s errors: %s", urlConn.getResponseCode(),
MAPPER.writeValueAsString(report)));
} catch (MalformedURLException | UnknownHostException e) {
} catch (MalformedURLException e) {
log.error(e.getMessage(), e);
report.put(e.getClass().getName(), e.getMessage());
throw new CollectorException(e.getMessage(), e);
} catch (SocketTimeoutException | SocketException e) {
} catch (SocketTimeoutException | SocketException | UnknownHostException e) {
log.error(e.getMessage(), e);
report.put(e.getClass().getName(), e.getMessage());
backoffAndSleep(getClientParams().getRetryDelay() * retryNumber * 1000);