Skip to content

Commit

Permalink
[lgwebos] Create WEB socket client using OH core method (openhab#14382)
Browse files Browse the repository at this point in the history
Follow-up PR openhab#14331

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and FordPrfkt committed Apr 19, 2023
1 parent 979b37e commit 1b1e9a0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.eclipse.jetty.websocket.client.WebSocketClient;
import org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler;
Expand Down Expand Up @@ -55,8 +54,7 @@ public LGWebOSHandlerFactory(final @Reference WebSocketFactory webSocketFactory,
* Cannot use openHAB's shared web socket client (webSocketFactory.getCommonWebSocketClient()) as we have to
* change client settings.
*/
var httpClient = new HttpClient(new SslContextFactory.Client(true));
this.webSocketClient = new WebSocketClient(httpClient);
this.webSocketClient = webSocketFactory.createWebSocketClient(BINDING_ID, new SslContextFactory.Client(true));
this.stateDescriptionProvider = stateDescriptionProvider;
}

Expand Down

0 comments on commit 1b1e9a0

Please sign in to comment.