Merge pull request #6486 from eclipse/jetty-9.4.x-6470-MessageInputStreamEOF
Issue #6470 - prevent EOF being released back into pool in MessageInputStream
This commit is contained in:
commit
40535f1cd7
|
@ -163,7 +163,8 @@ public class MessageInputStream extends InputStream implements MessageAppender
|
|||
|
||||
for (ByteBuffer buffer : buffers)
|
||||
{
|
||||
bufferPool.release(buffer);
|
||||
if (buffer != null && buffer != EOF)
|
||||
bufferPool.release(buffer);
|
||||
}
|
||||
|
||||
activeBuffer = null;
|
||||
|
@ -259,7 +260,8 @@ public class MessageInputStream extends InputStream implements MessageAppender
|
|||
synchronized (this)
|
||||
{
|
||||
// Release buffer back to pool.
|
||||
bufferPool.release(activeBuffer);
|
||||
if (activeBuffer != null && activeBuffer != EOF)
|
||||
bufferPool.release(activeBuffer);
|
||||
activeBuffer = null;
|
||||
|
||||
switch (state)
|
||||
|
|
Loading…
Reference in New Issue