From 1cdb9e0b488865527359ca3d7e527d414a779188 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Fri, 19 Apr 2013 07:06:22 +0200 Subject: [PATCH] Just fail all futures that are left to not cause out-of-order writes --- .../java/io/netty/handler/stream/ChunkedWriteHandler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java b/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java index a5fddb3de0..b318cca481 100644 --- a/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java +++ b/handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java @@ -351,9 +351,7 @@ public class ChunkedWriteHandler // This method should not need any synchronization as the ChunkedWriteHandler will not receive any new events @Override public void handlerRemoved(ChannelHandlerContext ctx) throws Exception { - doFlush(ctx); - - // Fail all MessageEvent's that are left. This is needed because otherwise we would never notify the + // Fail all promised that are queued. This is needed because otherwise we would never notify the // ChannelFuture and the registered FutureListener. See #304 discard(ctx, new ChannelException(ChunkedWriteHandler.class.getSimpleName() + " removed from pipeline.")); }