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 a4e587c46b
commit a69c4f2371

View File

@ -209,7 +209,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;
}