diff --git a/webserver/websocket/src/main/java/io/helidon/webserver/websocket/WsConnection.java b/webserver/websocket/src/main/java/io/helidon/webserver/websocket/WsConnection.java index 9f9b11d6bee..e2b69fa8c77 100644 --- a/webserver/websocket/src/main/java/io/helidon/webserver/websocket/WsConnection.java +++ b/webserver/websocket/src/main/java/io/helidon/webserver/websocket/WsConnection.java @@ -245,6 +245,8 @@ private ClientWsFrame readFrame() { try { // TODO check may payload size, danger of oom return ClientWsFrame.read(ctx, dataReader, Integer.MAX_VALUE); + } catch (DataReader.InsufficientDataAvailableException e) { + throw new CloseConnectionException("Socket closed by the other side", e); } catch (WsCloseException e) { close(e.closeCode(), e.getMessage()); throw new CloseConnectionException("WebSocket failed to read client frame", e);