Improved "Discarded inbound message" warning for embedded channel ()

Motivation:

Look like `EmbeddedChannelPipeline` should also override `onUnhandledInboundMessage(ChannelHandlerContext ctx, Object msg)` in order to do not print "Discarded message pipeline" because in case of `EmbeddedChannelPipeline` discarding actually not happens.

This fixes next warning in the latest netty version with websocket and `WebSocketServerCompressionHandler`:

```
13:36:36.231 DEBUG- Decoding WebSocket Frame opCode=2
13:36:36.231 DEBUG- Decoding WebSocket Frame length=5
13:36:36.231 DEBUG- Discarded message pipeline : [JdkZlibDecoder#0, DefaultChannelPipeline$TailContext#0]. Channel : [id: 0xembedded, L:embedded - R:embedded].
```

Modification:

Override correct method

Result:
Follow up fix after https://github.com/netty/netty/pull/9286
This commit is contained in:
Dmitriy Dumanskiy 2019-08-03 13:20:41 +03:00 committed by Norman Maurer
parent 1194577bd0
commit 005fd55b88

View File

@ -26,6 +26,7 @@ import io.netty.channel.ChannelConfig;
import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandler; import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelId; import io.netty.channel.ChannelId;
import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelMetadata; import io.netty.channel.ChannelMetadata;
@ -873,8 +874,8 @@ public class EmbeddedChannel extends AbstractChannel {
} }
@Override @Override
protected void onUnhandledInboundMessage(Object msg) { protected void onUnhandledInboundMessage(ChannelHandlerContext ctx, Object msg) {
handleInboundMessage(msg); handleInboundMessage(msg);
} }
} }
} }