diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java index 4b9962a4c..fe33dc549 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/impl/sync/MinimalClientExec.java @@ -145,9 +145,8 @@ public class MinimalClientExec implements ClientExecChain { if (execAware.isAborted()) { connRequest.cancel(); throw new RequestAbortedException("Request aborted"); - } else { - execAware.setCancellable(connRequest); } + execAware.setCancellable(connRequest); } final RequestConfig config = context.getRequestConfig(); @@ -228,9 +227,8 @@ public class MinimalClientExec implements ClientExecChain { // connection not needed and (assumed to be) in re-usable state releaseTrigger.releaseConnection(); return new HttpResponseProxy(response, null); - } else { - return new HttpResponseProxy(response, releaseTrigger); } + return new HttpResponseProxy(response, releaseTrigger); } catch (final ConnectionShutdownException ex) { final InterruptedIOException ioex = new InterruptedIOException( "Connection has been shut down");