Fixed issue: NETTY-215 ChunkedWriteHandler stops handling write queue when ChunkedInput.nextChunk() fails.

* Fixed a bad file descriptor error
This commit is contained in:
Trustin Lee 2009-08-27 05:56:40 +00:00
parent 6dc0b12020
commit 347131e0fa

View File

@ -221,7 +221,6 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
throws Exception { throws Exception {
if (!future.isSuccess()) { if (!future.isSuccess()) {
currentEvent.getFuture().setFailure(future.getCause()); currentEvent.getFuture().setFailure(future.getCause());
((ChunkedInput) currentEvent.getMessage()).close();
} }
} }
}); });
@ -234,6 +233,11 @@ public class ChunkedWriteHandler implements ChannelUpstreamHandler, ChannelDowns
ctx.sendDownstream(currentEvent); ctx.sendDownstream(currentEvent);
currentEvent = null; currentEvent = null;
} }
if (!channel.isConnected()) {
discard(ctx);
break;
}
} }
} }
} }