-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[mqtt] Fix availability topics subscription after Brige Restart #9851
Conversation
1589787
to
fd14bca
Compare
Fixes openhab#9850 Signed-off-by: Florian Albrecht <[email protected]>
fd14bca
to
a956bce
Compare
CI build fails (stops) after 1 hour. Appreciate any support how to "fix" that :-) |
} else { | ||
clearAllAvailabilityTopics(); | ||
} | ||
initializeAvailabilityTopicsFromConfig(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can tell, due to your changes in start
above, topic subscription will occur automatically as part of the call to super.initialize()
. So you don't need to call initializeAvailabilityTopicsFromConfig()
here at all. In fact it might be better if you don't since that way config errors will prevent further initialization, as they should.
You should also make changes in AbstractMQTTThingHandler.bridgeStatusChanged to make sure that the handler isn't offline due to config errors before it tries initializing a connection.
start(connection).get(subscribeTimeout, TimeUnit.MILLISECONDS); | ||
} catch (InterruptedException | ExecutionException | TimeoutException ignored) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if you made sure that the offline status would include the exception message, just like it did before.
@albrechtf What's the state of this PR? |
@fwolter The state is that my PR was not good enough for the maintainers, and I currently don't have time to adjust it according to their comments. Feel free to provide additional changes / patches so it may be good enough for merging, that would be very much appreciated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review comments are valid. In the meantime we lowered our quality standards a bit to accommodate the increasing number of PRs. If you find the time in the future to address the comments, please go ahead.
Fixes openhab#9850 Signed-off-by: Florian Albrecht <[email protected]> Signed-off-by: Nick Waterton <[email protected]>
Fixes openhab#9850 Signed-off-by: Florian Albrecht <[email protected]> Signed-off-by: Michael Schmidt <[email protected]>
Fixes openhab#9850 Signed-off-by: Florian Albrecht <[email protected]>
Fixes openhab#9850 Signed-off-by: Florian Albrecht <[email protected]>
Fixes openhab#9850 Signed-off-by: Florian Albrecht <[email protected]>
Fixes openhab#9850 Signed-off-by: Florian Albrecht <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
This is a Patch Proposal for #9850. It is the "easy" variant of the fix; the major design flaws in classes
AbstractMQTTThingHandler
andGenericMQTTThingHandler
(especially regarding availability topics) are not addressed.A Unit Test is included.