From b93760d3eac7eace084715599d9b1d9f7a14f423 Mon Sep 17 00:00:00 2001 From: Marco Collovati Date: Fri, 29 Nov 2024 09:33:54 +0100 Subject: [PATCH] fix: add vite-ping subprotocol to Vite websocket proxy (#20578) Fixes #20574 --- .../vaadin/base/devserver/viteproxy/ViteWebsocketEndpoint.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/viteproxy/ViteWebsocketEndpoint.java b/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/viteproxy/ViteWebsocketEndpoint.java index 032aade7a95..fb1e6a7f90a 100644 --- a/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/viteproxy/ViteWebsocketEndpoint.java +++ b/vaadin-dev-server/src/main/java/com/vaadin/base/devserver/viteproxy/ViteWebsocketEndpoint.java @@ -66,7 +66,7 @@ public static void init(VaadinContext context, ViteHandler viteHandler) { return; } try { - List subProtocols = Collections.singletonList("vite-hmr"); + List subProtocols = List.of("vite-hmr", "vite-ping"); ServerEndpointConfig endpointConfig = ServerEndpointConfig.Builder .create(ViteWebsocketEndpoint.class, viteHandler.getPathToVaadinInContext())