Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lifx] Improve InterruptedException handling #11653

Merged
merged 1 commit into from
Nov 28, 2021

Conversation

wborn
Copy link
Member

@wborn wborn commented Nov 28, 2021

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'

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>
@wborn wborn added the bug An unexpected problem or unintended behavior of an add-on label Nov 28, 2021
@wborn wborn requested a review from a team November 28, 2021 15:09
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lolodomo lolodomo merged commit 73ed075 into openhab:main Nov 28, 2021
@lolodomo lolodomo added this to the 3.2 milestone Nov 28, 2021
@wborn wborn deleted the lifx-improve-ie-handling branch November 28, 2021 15:50
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
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>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this pull request Jan 9, 2022
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>
Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
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>
volkmarnissen pushed a commit to volkmarnissen/openhab-addons that referenced this pull request Mar 3, 2022
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>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
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>
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants