Netty: Fix infinite loop after we change where we parse the body (regression)
@@ -108,12 +108,8 @@ public class NettyHandler extends ChannelInboundHandlerAdapter {
if (chunk instanceof LastHttpContent) {
context.decoder = decoder;
Router.Match result = router.match(context);
- if (result.matches()) {
- resetDecoderState(false);
+ resetDecoderState(!result.matches());
result.execute(context);
- } else {
- resetDecoderState(true);
- }
}
} else if (msg instanceof WebSocketFrame) {
if (context.webSocket != null) {
