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>