[sonyprojector] Fix handling of InterruptedException (Thread.sleep) (#10458)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
c9c52124e9
commit
a509c3b638
|
@ -950,9 +950,13 @@ public abstract class SonyProjectorConnector {
|
|||
if (!runningSession) {
|
||||
close();
|
||||
}
|
||||
} catch (SonyProjectorException | InterruptedException e) {
|
||||
} catch (SonyProjectorException e) {
|
||||
logger.debug("Send IR {} failed: {}", item.getName(), e.getMessage());
|
||||
throw new SonyProjectorException("Send IR " + item.getName() + " failed: " + e.getMessage());
|
||||
} catch (InterruptedException e) {
|
||||
logger.debug("Send IR {} interrupted: {}", item.getName(), e.getMessage());
|
||||
Thread.currentThread().interrupt();
|
||||
throw new SonyProjectorException("Send IR " + item.getName() + " interrupted: " + e.getMessage());
|
||||
}
|
||||
|
||||
logger.debug("Send IR {} succeeded", item.getName());
|
||||
|
|
|
@ -302,6 +302,7 @@ public class SonyProjectorSerialConnector extends SonyProjectorConnector impleme
|
|||
logger.debug("RXTX library CPU load workaround, sleep forever");
|
||||
Thread.sleep(Long.MAX_VALUE);
|
||||
} catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue