]> git.basschouten.com Git - openhab-addons.git/commit
[shelly] Always try to stop WebSocketClient (#15721)
authorWouter Born <github@maindrain.net>
Tue, 10 Oct 2023 07:44:37 +0000 (09:44 +0200)
committerGitHub <noreply@github.com>
Tue, 10 Oct 2023 07:44:37 +0000 (09:44 +0200)
commit0c3ef0a5f4b20fd86b052c2fbe17ace3abc36c3f
tree5b4ac912b49f8a420780a9ee42291ded9be5f82e
parentf1ccd728a6ef3874410db32f06a08813ae533faf
[shelly] Always try to stop WebSocketClient (#15721)

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