Skip to content

Commit

Permalink
Properly set inbound and outbound connection and stream window sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis Ryan committed Jun 11, 2015
1 parent 483738e commit 58a142a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public int bytes() {
* Standard flow-control window sizes.
*/
public enum FlowWindowSize {
SMALL(16383), MEDIUM(65535), LARGE(1048575), JUMBO(16777215);
SMALL(16383), MEDIUM(65535), LARGE(1048575), JUMBO(8388607);

private final int bytes;
FlowWindowSize(int bytes) {
Expand Down Expand Up @@ -140,7 +140,13 @@ public void setup(ExecutorType clientExecutor,

// Always use a different worker group from the client.
serverBuilder.workerEventLoopGroup(new NioEventLoopGroup());

// Always set connection and stream window size to same value
serverBuilder.connectionWindowSize(windowSize.bytes());
serverBuilder.streamWindowSize(windowSize.bytes());
channelBuilder.connectionWindowSize(windowSize.bytes());
channelBuilder.streamWindowSize(windowSize.bytes());

channelBuilder.negotiationType(NegotiationType.PLAINTEXT);
serverBuilder.maxConcurrentCallsPerConnection(maxConcurrentStreams);

Expand Down

0 comments on commit 58a142a

Please sign in to comment.