diff --git a/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java b/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java index 1799399622..4319ee93e2 100644 --- a/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java +++ b/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java @@ -282,7 +282,7 @@ public class IdleStateHandler extends ChannelStateHandlerAdapter implements Chan @Override public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelFuture future) throws Exception { - ctx.connect(remoteAddress, localAddress); + ctx.connect(remoteAddress, localAddress, future); } @Override @@ -309,7 +309,7 @@ public class IdleStateHandler extends ChannelStateHandlerAdapter implements Chan writerIdleCount = allIdleCount = 0; } }); - ctx.sendFile(region); + ctx.sendFile(region, future); } private void initialize(ChannelHandlerContext ctx) {