Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions netty/src/main/java/io/grpc/netty/NettyServerHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ static NettyServerHandler newHandler(
maxMessageSize);

final Http2Connection connection = new DefaultHttp2Connection(true);
connection.remote().maxActiveStreams(maxStreams);
UniformStreamByteDistributor dist = new UniformStreamByteDistributor(connection);
dist.minAllocationChunk(MIN_ALLOCATED_CHUNK); // Increased for benchmarks performance.
DefaultHttp2RemoteFlowController controller =
Expand Down
8 changes: 8 additions & 0 deletions netty/src/test/java/io/grpc/netty/NettyServerHandlerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,14 @@ public void shouldAdvertiseMaxConcurrentStreams() throws Exception {
assertEquals(maxConcurrentStreams, captor.getValue().maxConcurrentStreams().longValue());
}

@Test
public void connectionRemoteMaxActiveStreamsShouldBeEnforcedLocallyOnStartup() throws Exception {
maxConcurrentStreams = 314;
manualSetUp();

assertEquals(maxConcurrentStreams, connection().remote().maxActiveStreams());
}

@Test
public void shouldAdvertiseMaxHeaderListSize() throws Exception {
maxHeaderListSize = 123;
Expand Down
Loading