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