Skip to content

Commit

Permalink
[rotel] Fix handling of InterruptedException (Thread.sleep) (openhab#…
Browse files Browse the repository at this point in the history
…10460)

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: John Marshall <john.marshall.au@gmail.com>
  • Loading branch information
lolodomo authored and themillhousegroup committed May 10, 2021
1 parent a5ed2ab commit 853c8dc
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
scheduleReconnectJob();
} catch (InterruptedException e) {
logger.debug("Command {} from channel {} interrupted: {}", command, channel, e.getMessage());
Thread.currentThread().interrupt();
}
}
}
Expand Down Expand Up @@ -1686,6 +1687,7 @@ private void schedulePowerOnJob() {
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);
Expand Down Expand Up @@ -1729,6 +1731,7 @@ private void schedulePowerOnZone2Job() {
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence zone 2 interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);
Expand Down Expand Up @@ -1772,6 +1775,7 @@ private void schedulePowerOnZone3Job() {
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence zone 3 interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);
Expand Down Expand Up @@ -1815,6 +1819,7 @@ private void schedulePowerOnZone4Job() {
closeConnection();
} catch (InterruptedException e) {
logger.debug("Init sequence zone 4 interrupted: {}", e.getMessage());
Thread.currentThread().interrupt();
}
}
}, 2500, TimeUnit.MILLISECONDS);
Expand Down

0 comments on commit 853c8dc

Please sign in to comment.