diff --git a/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java b/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java index e2761d8eb..76a497167 100644 --- a/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java +++ b/bundles/org.openhab.binding.miele/src/main/java/org/openhab/binding/miele/internal/handler/MieleBridgeHandler.java @@ -398,7 +398,12 @@ public class MieleBridgeHandler extends BaseBridgeHandler { listener.onAppliancePropertyChanged(uid, dp); } } catch (SocketTimeoutException e) { - Thread.sleep(500); + try { + Thread.sleep(500); + } catch (InterruptedException ex) { + logger.debug("Eventlistener has been interrupted."); + break; + } } } } catch (Exception ex) { @@ -633,5 +638,9 @@ public class MieleBridgeHandler extends BaseBridgeHandler { pollingJob.cancel(true); pollingJob = null; } + if (eventListenerJob != null) { + eventListenerJob.cancel(true); + eventListenerJob = null; + } } }