Skip to content

Commit

Permalink
[tivo] Fix thing staying offline after connection refresh (openhab#10902
Browse files Browse the repository at this point in the history
)

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
  • Loading branch information
mlobstein committed Jul 6, 2021
1 parent 930431d commit 1b33f86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
}

public void setStatusOffline() {
lastConnectionStatus = ConnectionStatus.UNKNOWN;
this.updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"Power on device or check network configuration/connection.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
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;
Expand Down Expand Up @@ -441,7 +442,7 @@ public void run() {

try {
receivedData = reader.readLine();
} catch (SocketTimeoutException e) {
} catch (SocketTimeoutException | SocketException e) {
// Do nothing. Just allow the thread to check if it has to stop.
}

Expand Down

0 comments on commit 1b33f86

Please sign in to comment.