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

[bondhome] Catch null host exception in discovery service #17924

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

mlobstein
Copy link
Contributor

Upon upgrading to OH-4.3.0, I am seeing this error at startup or anytime the bond bridge is disabled and re-enabled. The issue appears to be a race condition where the discovery service attempts to start calling request() before bridgeHandler.getBridgeIpAddress() can provide the IP address of the bridge. By catching the IllegalArgumentException , the service will continue and is able to discover devices in subsequent scans.

image

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
@mlobstein mlobstein added the bug An unexpected problem or unintended behavior of an add-on label Dec 18, 2024
@mlobstein mlobstein requested a review from ccutrer as a code owner December 18, 2024 01:36
@ccutrer
Copy link
Contributor

ccutrer commented Dec 18, 2024

Thanks for this fix. I've seen this error in my log occasionally, but has never caused issues controlling my device, so have just prioritized other fixes above it.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@lsiepel lsiepel merged commit 29915c4 into openhab:main Dec 18, 2024
3 checks passed
lsiepel pushed a commit that referenced this pull request Dec 18, 2024
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
@lsiepel lsiepel added the patch A PR that has been cherry-picked to a patch release branch label Dec 18, 2024
@jlaur jlaur added this to the 5.0 milestone Dec 18, 2024
@mlobstein mlobstein deleted the bond_nullhost branch December 19, 2024 02:25
cipianpascu pushed a commit to cipianpascu/openhab-addons that referenced this pull request Jan 2, 2025
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
chilobo pushed a commit to chilobo/openhab-addons that referenced this pull request Feb 10, 2025
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
Signed-off-by: Christian Koch <78686276+chilobo@users.noreply.github.com>
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 patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants