]> git.basschouten.com Git - openhab-addons.git/commit
[shelly] Always try to stop WebSocketClient (#15719)
authorWouter Born <github@maindrain.net>
Sun, 8 Oct 2023 09:28:10 +0000 (11:28 +0200)
committerGitHub <noreply@github.com>
Sun, 8 Oct 2023 09:28:10 +0000 (11:28 +0200)
commit72622a1409d143915b912de538083cf6bc7e1cc9
tree1813d3f7344b947c4baa04124465c55e527f3926
parentbef7744c568ab0a52a61d6b83e87a0f1ee3fd3a7
[shelly] Always try to stop WebSocketClient (#15719)

If the client is not stopped it will not be garbage collected because the ShutdownThread keeps a reference to the client so it can be stopped on shutdowns.

See: https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/jetty-websocket/websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java#L420-L433

Signed-off-by: Wouter Born <github@maindrain.net>
bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api2/Shelly2ApiRpc.java
bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api2/Shelly2RpcSocket.java