Interrupt current thread on InterruptedException (#12323)

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen
2022-02-20 14:22:40 +01:00
committed by GitHub
parent 4d77608da1
commit c03dbfd520

View File

@@ -562,6 +562,9 @@ public class HDPowerViewWebTargets {
try {
response = request.send();
} catch (InterruptedException | TimeoutException | ExecutionException e) {
if (e instanceof InterruptedException) {
Thread.currentThread().interrupt();
}
if (Instant.now().isBefore(maintenanceScheduledEnd)) {
// throw "softer" exception during maintenance window
logger.debug("Hub still undergoing maintenance");