From e70fbe316d63c28c81e175095297b2205e656eca Mon Sep 17 00:00:00 2001 From: "Michael K. Werle" Date: Mon, 1 May 2017 12:48:55 -0500 Subject: [PATCH] Fire exceptionCaught before exception-caused close for WebSockets. Motivation: WebSocket decoding throws exceptions on failure that should cause the pipline to close. These are currently ignored in the `WebSocketProtocolHandler` and `WebSocketServerProtocolHandler`. In particular, this means that messages exceding the max message size will cause the channel to close with no reported failure. Modifications: Re-fire the event just before closing the socket to allow it to be handled appropriately. Result: Closes [#3063]. --- .../handler/codec/http/websocketx/WebSocketProtocolHandler.java | 1 + .../codec/http/websocketx/WebSocketServerProtocolHandler.java | 1 + 2 files changed, 2 insertions(+) diff --git a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketProtocolHandler.java b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketProtocolHandler.java index bb150e39b0..7037ae3468 100644 --- a/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketProtocolHandler.java +++ b/codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketProtocolHandler.java @@ -39,6 +39,7 @@ abstract class WebSocketProtocolHandler extends MessageToMessageDecoder