461452 Double release of buffer by HttpReceiverOverHTTP
Clear buffer on exception to avoid release guard
This commit is contained in:
parent
042de2ec9f
commit
2619edff5a
|
@ -80,6 +80,8 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
||||||
{
|
{
|
||||||
if (buffer==null)
|
if (buffer==null)
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
|
if (BufferUtil.hasContent(buffer))
|
||||||
|
throw new IllegalStateException();
|
||||||
HttpClient client = getHttpDestination().getHttpClient();
|
HttpClient client = getHttpDestination().getHttpClient();
|
||||||
ByteBufferPool bufferPool = client.getByteBufferPool();
|
ByteBufferPool bufferPool = client.getByteBufferPool();
|
||||||
bufferPool.release(buffer);
|
bufferPool.release(buffer);
|
||||||
|
@ -133,6 +135,7 @@ public class HttpReceiverOverHTTP extends HttpReceiver implements HttpParser.Res
|
||||||
{
|
{
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug(x);
|
LOG.debug(x);
|
||||||
|
BufferUtil.clear(buffer);
|
||||||
releaseBuffer();
|
releaseBuffer();
|
||||||
failAndClose(x);
|
failAndClose(x);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue