Set connectionWindow to MAX_INT.

This is a temporary fix for https://github.com/grpc/grpc-java/issues/1175. We will revisit this change after auto-refill is supported in Netty.
This commit is contained in:
nmittler 2015-10-30 10:23:09 -07:00
parent 750b1977ca
commit b9195fb9aa
3 changed files with 6 additions and 3 deletions

View File

@ -56,9 +56,8 @@ abstract class AbstractNettyHandler extends Http2ConnectionHandler {
Http2Settings initialSettings) {
super(decoder, encoder, initialSettings);
// If a stream window was specified, update the connection window to match it.
this.initialConnectionWindow = initialSettings.initialWindowSize() == null ? -1 :
initialSettings.initialWindowSize();
// TODO(nmittler): Use auto-refill once https://github.com/grpc/grpc-java/issues/1175 is fixed.
this.initialConnectionWindow = Integer.MAX_VALUE;
}
@Override

View File

@ -79,6 +79,7 @@ import io.netty.handler.codec.http2.Http2Stream;
import io.netty.util.AsciiString;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@ -332,6 +333,7 @@ public class NettyClientHandlerTest extends NettyHandlerTestBase<NettyClientHand
}
@Test
@Ignore("Re-enable once https://github.com/grpc/grpc-java/issues/1175 is fixed")
public void connectionWindowShouldBeOverridden() throws Exception {
flowControlWindow = 1048576; // 1MiB
setUp();

View File

@ -83,6 +83,7 @@ import io.netty.util.AsciiString;
import io.netty.util.ByteString;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@ -252,6 +253,7 @@ public class NettyServerHandlerTest extends NettyHandlerTestBase<NettyServerHand
}
@Test
@Ignore("Re-enable once https://github.com/grpc/grpc-java/issues/1175 is fixed")
public void connectionWindowShouldBeOverridden() throws Exception {
flowControlWindow = 1048576; // 1MiB
setUp();