]> git.basschouten.com Git - openhab-addons.git/commit
[gardena] Improve GardenaSmartImpl initialization order (#14722)
authormaniac103 <dannybaumann@web.de>
Fri, 7 Apr 2023 12:25:20 +0000 (14:25 +0200)
committerGitHub <noreply@github.com>
Fri, 7 Apr 2023 12:25:20 +0000 (14:25 +0200)
commit49e407d028f64ae0c646823f0b65a5fbd47941a0
tree19c628a9546f2e6116997974d3bbd54b9c99ee3f
parent86f829fa21783124d88eb1f60d237d2e825e9f64
[gardena] Improve GardenaSmartImpl initialization order (#14722)

If an exception occurs during httpClient.start(), webSocketClient
remained null, which led to another (then unhandled) exception being thrown
by dispose(), called in the exception handler.
With the new initialization order it's ensured webSocketClient is not
null at dispose() time, thus allowing proper propagation of the
exception thrown at HTTP startup.

Signed-off-by: Danny Baumann <dannybaumann@web.de>
bundles/org.openhab.binding.gardena/src/main/java/org/openhab/binding/gardena/internal/GardenaSmartImpl.java