Refactor ChunkedWriteHandler to remove synchronization which can have bad side effects like deadlocks. See #297 and #301

Conflicts:

	handler/src/main/java/io/netty/handler/stream/ChunkedWriteHandler.java
This commit is contained in:
norman 2012-05-04 10:31:06 +02:00 committed by Trustin Lee
parent 280c65a28e
commit 31e643b32d

View File

@ -250,7 +250,6 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
//
// See https://github.com/netty/netty/issues/303
writeFuture.addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
closeInput(chunks);
@ -288,7 +287,6 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
// mark the flush as done
flush.set(false);
}
}
if (acquired && !channel.isConnected() || channel.isWritable() && !queue.isEmpty()) {