From dd0bbda07091d1f5532cf998ed91c90751049d33 Mon Sep 17 00:00:00 2001 From: JasonMathison Date: Wed, 5 Jan 2022 15:54:46 -0500 Subject: [PATCH] Httpclient-2194 async retries not including body (#343) --- .../hc/client5/http/impl/async/AsyncHttpRequestRetryExec.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncHttpRequestRetryExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncHttpRequestRetryExec.java index b12a8159e..3101ade5e 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncHttpRequestRetryExec.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/async/AsyncHttpRequestRetryExec.java @@ -128,6 +128,9 @@ public final class AsyncHttpRequestRetryExec implements AsyncExecChainHandler { public void completed() { if (state.retrying) { scope.execCount.incrementAndGet(); + if (entityProducer != null) { + entityProducer.releaseResources(); + } scope.scheduler.scheduleExecution(request, entityProducer, scope, asyncExecCallback, state.delay); } else { asyncExecCallback.completed();