Skip to content

Commit 4ff944e

Browse files
committed
apply to server-initiated streams
1 parent 01491ad commit 4ff944e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,12 @@ private void produceOutput() throws HttpException, IOException {
12391239
final Map.Entry<Integer, H2Stream> entry = it.next();
12401240
final H2Stream stream = entry.getValue();
12411241
if (!stream.isLocalClosed() && stream.getOutputWindow().get() > 0) {
1242+
if (!stream.isRemoteInitiated() && stream.channel.idle) {
1243+
final int outboundLimit = remoteConfig.getMaxConcurrentStreams();
1244+
if (countActiveLocalInitiated() >= outboundLimit) {
1245+
continue;
1246+
}
1247+
}
12421248
stream.produceOutput();
12431249
}
12441250
if (stream.isTerminated()) {

0 commit comments

Comments
 (0)