]> git.basschouten.com Git - openhab-addons.git/commit
[lifx] Improve InterruptedException handling (#11653)
authorWouter Born <github@maindrain.net>
Sun, 28 Nov 2021 15:37:29 +0000 (16:37 +0100)
committerGitHub <noreply@github.com>
Sun, 28 Nov 2021 15:37:29 +0000 (16:37 +0100)
commit73ed075d4efa65c61511c186d8c2ceee478ef133
tree57453b41cd0ce962bf2829aab07c0c91084da77b
parent612afd2e0747d5cea81c67e82adf0022c8abcf00
[lifx] Improve InterruptedException handling (#11653)

When the binding is stopped sleeping threads are interrupted by design.
By throwing the InterruptedException, it should be caught in LifxSelectorUtil.sendPacket (which is waiting for the packet interval to elapse), which will then abort sending a packet.

This prevents:

```
[ERROR] [lifx.internal.util.LifxThrottlingUtil] - An exception occurred while putting the thread to sleep : 'sleep interrupted'
```

Signed-off-by: Wouter Born <github@maindrain.net>
bundles/org.openhab.binding.lifx/src/main/java/org/openhab/binding/lifx/internal/util/LifxThrottlingUtil.java