jrialland / ajp-client

Java implementation of an AJP13 protocol client (aka Apache JServ), allowing to send requests to a servlet container using this protocol.
Apache License 2.0
30 stars 7 forks source link

ByteBuf leak in ForwardImpl when response is large #4

Closed kylefdyer closed 5 years ago

kylefdyer commented 5 years ago

handleSendBodyChunkMessage in ForwardImplt reads the ByteBuf but isn't releasing it. I saw warnings in my logs from the netty leak detection.

I think you'd just have to add a call to release like this:

@Override
public void handleSendBodyChunkMessage(final ByteBuf data) throws Exception {
    data.readBytes(response.getOutputStream(), data.readableBytes());
    data.release();
}