You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2020/04/19 09:27:56 UTC
[httpcomponents-core] branch master updated: Bug fix: explicitly
release resources of the exchange handler
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
The following commit(s) were added to refs/heads/master by this push:
new 5372637 Bug fix: explicitly release resources of the exchange handler
5372637 is described below
commit 5372637907b7f47a43730c1fe7bf5d694090cecc
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sat Apr 18 17:54:41 2020 +0200
Bug fix: explicitly release resources of the exchange handler
---
.../org/apache/hc/core5/http/impl/bootstrap/HttpAsyncRequester.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/HttpAsyncRequester.java b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/HttpAsyncRequester.java
index 952899b..defebdd 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/HttpAsyncRequester.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/HttpAsyncRequester.java
@@ -433,7 +433,11 @@ public class HttpAsyncRequester extends AsyncRequester implements ConnPoolContro
}
ioSession.enqueue(new RequestExecutionCommand(exchangeHandler, pushHandlerFactory, null, context), Command.Priority.NORMAL);
if (!ioSession.isOpen()) {
- exchangeHandler.failed(new ConnectionClosedException());
+ try {
+ exchangeHandler.failed(new ConnectionClosedException());
+ } finally {
+ exchangeHandler.releaseResources();
+ }
}
}