From ddd60f1992fe451ac017713f7efb8cde48cf2263 Mon Sep 17 00:00:00 2001 From: lachan-roberts Date: Fri, 8 Mar 2019 14:50:49 +1100 Subject: [PATCH] Issue #3406 - changes from review Signed-off-by: lachan-roberts --- .../org/eclipse/jetty/websocket/client/WebSocketClient.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jetty-websocket/jetty-websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java b/jetty-websocket/jetty-websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java index 999d98bd1b6..187f7437fa4 100644 --- a/jetty-websocket/jetty-websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java +++ b/jetty-websocket/jetty-websocket-client/src/main/java/org/eclipse/jetty/websocket/client/WebSocketClient.java @@ -73,7 +73,6 @@ public class WebSocketClient extends ContainerLifeCycle implements WebSocketPoli public WebSocketClient() { this(null); - coreClient.getHttpClient().setName("Jetty-WebSocketClient@" + hashCode()); } /** @@ -86,6 +85,9 @@ public class WebSocketClient extends ContainerLifeCycle implements WebSocketPoli coreClient = new WebSocketCoreClient(httpClient, configurationCustomizer); addManaged(coreClient); + if (httpClient == null) + coreClient.getHttpClient().setName("Jetty-WebSocketClient@" + hashCode()); + objectFactory = new DecoratedObjectFactory(); extensionRegistry = new WebSocketExtensionRegistry(); frameHandlerFactory = new JettyWebSocketFrameHandlerFactory(this);