]> git.basschouten.com Git - openhab-addons.git/commitdiff
Interrupt current thread on InterruptedException (#12323)
authorJacob Laursen <jacob-github@vindvejr.dk>
Sun, 20 Feb 2022 13:22:40 +0000 (14:22 +0100)
committerGitHub <noreply@github.com>
Sun, 20 Feb 2022 13:22:40 +0000 (14:22 +0100)
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
bundles/org.openhab.binding.hdpowerview/src/main/java/org/openhab/binding/hdpowerview/internal/HDPowerViewWebTargets.java

index 654e2f3c60bcfc57e2cde8fd28491d4f082267f0..0c43befa9e06d460597783b2ad01cff8c2f542eb 100644 (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");