From 0e4ed5c7b1530308b5f45326de0d05920e205d59 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Mon, 15 Feb 2021 15:13:02 +1100 Subject: [PATCH] Issue #5828 - cleanups from review Signed-off-by: Lachlan Roberts --- ...JavaxWebSocketClientContainerProvider.java | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/jetty-websocket/websocket-javax-client/src/main/java/org/eclipse/jetty/websocket/javax/client/JavaxWebSocketClientContainerProvider.java b/jetty-websocket/websocket-javax-client/src/main/java/org/eclipse/jetty/websocket/javax/client/JavaxWebSocketClientContainerProvider.java index 70f23f7a09d..9b64a566d3a 100644 --- a/jetty-websocket/websocket-javax-client/src/main/java/org/eclipse/jetty/websocket/javax/client/JavaxWebSocketClientContainerProvider.java +++ b/jetty-websocket/websocket-javax-client/src/main/java/org/eclipse/jetty/websocket/javax/client/JavaxWebSocketClientContainerProvider.java @@ -71,23 +71,10 @@ public class JavaxWebSocketClientContainerProvider extends ContainerProvider } // See: https://github.com/eclipse-ee4j/websocket-api/issues/212 - private WebSocketContainer registerShutdown(JavaxWebSocketClientContainer container) + private void registerShutdown(JavaxWebSocketClientContainer container) { - // Register as JVM runtime shutdown hook? + // Register as JVM runtime shutdown hook. ShutdownThread.register(container); - - if (!container.isStarted()) - { - try - { - container.start(); - } - catch (Exception e) - { - throw new RuntimeException("Unable to start Client Container", e); - } - } - - return container; + LifeCycle.start(container); } }