Skip to content

Commit ccc8d68

Browse files
authored
helidon-io#7886 WebSocket throws exception when client disconnects (helidon-io#7890)
1 parent af4eba9 commit ccc8d68

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

webserver/websocket/src/main/java/io/helidon/webserver/websocket/WsConnection.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ private ClientWsFrame readFrame() {
245245
try {
246246
// TODO check may payload size, danger of oom
247247
return ClientWsFrame.read(ctx, dataReader, Integer.MAX_VALUE);
248+
} catch (DataReader.InsufficientDataAvailableException e) {
249+
throw new CloseConnectionException("Socket closed by the other side", e);
248250
} catch (WsCloseException e) {
249251
close(e.closeCode(), e.getMessage());
250252
throw new CloseConnectionException("WebSocket failed to read client frame", e);

0 commit comments

Comments
 (0)