From 43d13064d17df55a48a5b05c712c13b69de7da46 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Thu, 20 Dec 2012 12:25:13 +0100 Subject: [PATCH] [#837] CombinedChannelHandler must pass sendFile(...) to the wrapped ChannelOutboundHandler --- .../io/netty/channel/CombinedChannelHandler.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/transport/src/main/java/io/netty/channel/CombinedChannelHandler.java b/transport/src/main/java/io/netty/channel/CombinedChannelHandler.java index 13b5728760..298cd55ac8 100644 --- a/transport/src/main/java/io/netty/channel/CombinedChannelHandler.java +++ b/transport/src/main/java/io/netty/channel/CombinedChannelHandler.java @@ -19,8 +19,12 @@ import io.netty.buffer.Buf; import java.net.SocketAddress; -public class CombinedChannelHandler - extends ChannelHandlerAdapter implements ChannelInboundHandler, ChannelOutboundHandler { +/** + * Combines a {@link ChannelInboundHandler} and a {@link ChannelOutboundHandler} into one {@link ChannelHandler}. + * + */ +public class CombinedChannelHandler extends ChannelStateHandlerAdapter implements ChannelInboundHandler, + ChannelOutboundHandler { private ChannelOutboundHandler out; private ChannelInboundHandler in; @@ -197,4 +201,9 @@ public class CombinedChannelHandler ChannelHandlerContext ctx, ChannelFuture future) throws Exception { out.flush(ctx, future); } + + @Override + public void sendFile(ChannelHandlerContext ctx, FileRegion region, ChannelFuture future) throws Exception { + out.sendFile(ctx, region, future); + } }