Skip to content

Commit

Permalink
CAMEL-19758: netty-http in proxy mode generates IllegalReferenceCount…
Browse files Browse the repository at this point in the history
…Exception for every success request. (#11146)
  • Loading branch information
luigidemasi authored and davsclaus committed Aug 18, 2023
1 parent 4723a82 commit 8b06937
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ public Message toCamelMessage(FullHttpRequest request, Exchange exchange, NettyH
exchange.adapt(ExtendedExchange.class).addOnCompletion(new SynchronizationAdapter() {
@Override
public void onDone(Exchange exchange) {
ReferenceCountUtil.release(request.content());
if (request.content().refCnt() > 0) {
LOG.debug("Releasing Netty HttpResponse ByteBuf");
ReferenceCountUtil.release(request.content());
}
}
});
} else {
Expand Down

0 comments on commit 8b06937

Please sign in to comment.