Fix IllegalReferenceCountException which occurs when multipart data is stored in memory
- Fixes #2102
This commit is contained in:
parent
a4e587c46b
commit
a69c4f2371
@ -209,7 +209,7 @@ public abstract class AbstractMemoryHttpData extends AbstractHttpData {
|
|||||||
if (sizeLeft < length) {
|
if (sizeLeft < length) {
|
||||||
sliceLength = sizeLeft;
|
sliceLength = sizeLeft;
|
||||||
}
|
}
|
||||||
ByteBuf chunk = byteBuf.slice(chunkPosition, sliceLength);
|
ByteBuf chunk = byteBuf.slice(chunkPosition, sliceLength).retain();
|
||||||
chunkPosition += sliceLength;
|
chunkPosition += sliceLength;
|
||||||
return chunk;
|
return chunk;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user