Fix IllegalReferenceCountException which occurs when multipart data is stored in memory

- Fixes #2102
This commit is contained in:
Trustin Lee 2014-01-19 17:50:48 +09:00
parent 2389c71e81
commit f3482670f9

View File

@ -206,7 +206,7 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData {
if (sizeLeft < length) {
sliceLength = sizeLeft;
}
ByteBuf chunk = byteBuf.slice(chunkPosition, sliceLength);
ByteBuf chunk = byteBuf.slice(chunkPosition, sliceLength).retain();
chunkPosition += sliceLength;
return chunk;
}