diff --git a/bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/XMLConnection.java b/bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/XMLConnection.java index c3274199ba0..3b9f85c1474 100644 --- a/bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/XMLConnection.java +++ b/bundles/org.openhab.binding.yamahareceiver/src/main/java/org/openhab/binding/yamahareceiver/internal/protocol/xml/XMLConnection.java @@ -47,6 +47,7 @@ public class XMLConnection extends AbstractConnection { private static final String HEADER_CHARSET_PART = "charset="; private static final int CONNECTION_TIMEOUT_MS = 5000; + private static final int READ_TIMEOUT_MS = 3000; public XMLConnection(String host) { super(host); @@ -77,6 +78,7 @@ public class XMLConnection extends AbstractConnection { // Set a timeout in case the device is not reachable (went offline) connection.setConnectTimeout(CONNECTION_TIMEOUT_MS); + connection.setReadTimeout(READ_TIMEOUT_MS); connection.setUseCaches(false); connection.setDoInput(true);