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:
parent
b4feb7ac19
commit
dce21483e3
@ -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 = (ByteBuf) decoder.readOutbound();
|
||||
ByteBuf buf = (ByteBuf) decoder.readInbound();
|
||||
if (buf == null) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user