HTTP Content Decoder Cleanup Bug

Motiviation:
The HTTP content decoder's cleanup method is not cleaning up the decoder correctly.
The cleanup method is currently doing a readOutbound on the EmbeddedChannel but
for decoding the call should be readInbound.

Modifications:
-Change readOutbound to readInbound in the cleanup method

Result:
The cleanup method should be correctly releaseing unused resources
This commit is contained in:
Scott Mitchell 2014-09-10 08:33:32 -04:00 committed by Norman Maurer
parent 3cf65e3987
commit 003f97168c

View File

@ -203,10 +203,10 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder<HttpObj
private void cleanup() {
if (decoder != null) {
// Clean-up the previous encoder if not cleaned up correctly.
// Clean-up the previous decoder if not cleaned up correctly.
if (decoder.finish()) {
for (;;) {
ByteBuf buf = decoder.readOutbound();
ByteBuf buf = decoder.readInbound();
if (buf == null) {
break;
}