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 2021/11/09 13:11:27 UTC
[httpcomponents-core] 02/02: H2 stream resource release optimization
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch HTTPCORE-696
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit 66841cd7073866efe09a346230d00d5cdeca8354
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Tue Nov 9 13:58:34 2021 +0100
H2 stream resource release optimization
---
.../apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
index b7903bc..68a4d0f 100644
--- a/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
+++ b/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java
@@ -750,6 +750,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
if (stream.isTerminated()) {
streamMap.remove(streamId);
stream.releaseResources();
+ requestSessionOutput();
}
}
break;
@@ -796,6 +797,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
if (stream.isTerminated()) {
streamMap.remove(streamId);
stream.releaseResources();
+ requestSessionOutput();
}
}
break;
@@ -820,6 +822,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
if (stream.isTerminated()) {
streamMap.remove(streamId);
stream.releaseResources();
+ requestSessionOutput();
}
}
break;
@@ -869,6 +872,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
stream.reset(new H2StreamResetException(errorCode, "Stream reset (" + errorCode + ")"));
streamMap.remove(streamId);
stream.releaseResources();
+ requestSessionOutput();
}
}
break;
@@ -1195,6 +1199,7 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
if (stream.isTerminated()) {
it.remove();
stream.releaseResources();
+ requestSessionOutput();
}
if (!outputQueue.isEmpty()) {
break;
@@ -1682,7 +1687,6 @@ abstract class AbstractH2StreamMultiplexer implements Identifiable, HttpConnecti
void releaseResources() {
handler.releaseResources();
- channel.requestOutput();
}
void appendState(final StringBuilder buf) {