* Fixes #9862
Catch all exceptions in scheduled task to prevent future executions from being suppressed.
Signed-off-by: Pawel Switalski <switalski.pw@gmail.com>
Signed-off-by: Pawel <s-pw@example.com>
}
private void executePeridioc() {
- sinceLastReadSec.addAndGet(CHECK_PERIOD_SEC);
- execute();
+ try {
+ sinceLastReadSec.addAndGet(CHECK_PERIOD_SEC);
+ execute();
+ } catch (Exception e) { // catch all to avoid scheduleWithFixedDelay being suppressed
+ logger.warn("Failed to read Airthings device", e);
+ }
}
private synchronized void execute() {