mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[tivo] Fix thing staying offline after connection refresh (#10902)
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
parent
fd577a78b0
commit
58f20c5028
@ -115,6 +115,7 @@ public class TiVoHandler extends BaseThingHandler {
|
||||
}
|
||||
|
||||
public void setStatusOffline() {
|
||||
lastConnectionStatus = ConnectionStatus.UNKNOWN;
|
||||
this.updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
|
||||
"Power on device or check network configuration/connection.");
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintStream;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketException;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -441,7 +442,7 @@ public class TivoStatusProvider {
|
||||
|
||||
try {
|
||||
receivedData = reader.readLine();
|
||||
} catch (SocketTimeoutException e) {
|
||||
} catch (SocketTimeoutException | SocketException e) {
|
||||
// Do nothing. Just allow the thread to check if it has to stop.
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user