diff --git a/bundles/org.openhab.binding.digiplex/src/main/java/org/openhab/binding/digiplex/internal/handler/DigiplexBridgeHandler.java b/bundles/org.openhab.binding.digiplex/src/main/java/org/openhab/binding/digiplex/internal/handler/DigiplexBridgeHandler.java index f805eba944d1f..35ab2006c213b 100644 --- a/bundles/org.openhab.binding.digiplex/src/main/java/org/openhab/binding/digiplex/internal/handler/DigiplexBridgeHandler.java +++ b/bundles/org.openhab.binding.digiplex/src/main/java/org/openhab/binding/digiplex/internal/handler/DigiplexBridgeHandler.java @@ -320,8 +320,9 @@ public void run() { if (messagesSent.get() - responsesReceived.get() > STALLED_MESSAGES_THRESHOLD) { throw new IOException("PRT3 module is not responding!"); } - - } catch (IOException e) { + } catch (InterruptedException e) { + break; + } catch (Exception e) { handleCommunicationError(); break; } @@ -369,11 +370,11 @@ public void run() { updateState(BRIDGE_MESSAGES_SENT, new DecimalType(messagesSent.incrementAndGet())); logger.debug("message sent: '{}'", request.getSerialMessage().replace("\r", "")); Thread.sleep(SLEEP_TIME); // do not flood PRT3 with messages as it creates unpredictable responses - } catch (IOException e) { - handleCommunicationError(); - break; } catch (InterruptedException e) { break; + } catch (Exception e) { + handleCommunicationError(); + break; } } logger.debug("Sender thread finished");