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 2025/08/30 12:27:17 UTC
(httpcomponents-core) 02/02: Improved resource deallocation by ClassicToAsyncResponseConsumer
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
commit 3244ab48bacb912cefaa183a3cbc73c401bebe49
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sat Aug 30 14:26:56 2025 +0200
Improved resource deallocation by ClassicToAsyncResponseConsumer
---
.../core5/http/nio/support/classic/ClassicToAsyncResponseConsumer.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/ClassicToAsyncResponseConsumer.java b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/ClassicToAsyncResponseConsumer.java
index 8c33f7862..0e4c5231c 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/ClassicToAsyncResponseConsumer.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/ClassicToAsyncResponseConsumer.java
@@ -186,6 +186,9 @@ public final void failed(final Exception cause) {
@Override
public void releaseResources() {
+ if (responseRef.get() == null) {
+ failed(new InterruptedIOException("Operation aborted"));
+ }
}
class InternalInputStream extends InputStream {