Issue #581 - Initial session recv window setting not working.

Updating the local session receive window before sending it to the client.
This commit is contained in:
Simone Bordet 2016-05-20 11:17:36 +02:00
parent d73bf08515
commit c8c74da50a
2 changed files with 7 additions and 0 deletions

View File

@ -41,6 +41,7 @@ import org.eclipse.jetty.http2.api.Stream;
import org.eclipse.jetty.http2.frames.DataFrame;
import org.eclipse.jetty.http2.frames.HeadersFrame;
import org.eclipse.jetty.http2.frames.ResetFrame;
import org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.util.Callback;
import org.eclipse.jetty.util.FuturePromise;
@ -65,6 +66,9 @@ public class SmallThreadPoolLoadTest extends AbstractTest
serverThreads.setDetailedDump(true);
serverThreads.setMaxThreads(5);
serverThreads.setLowThreadsThreshold(1);
AbstractHTTP2ServerConnectionFactory h2 = connector.getBean(AbstractHTTP2ServerConnectionFactory.class);
h2.setInitialSessionRecvWindow(Integer.MAX_VALUE);
}
@Test

View File

@ -66,7 +66,10 @@ public class HTTP2ServerSession extends HTTP2Session implements ServerParser.Lis
WindowUpdateFrame windowFrame = null;
int sessionWindow = getInitialSessionRecvWindow() - FlowControlStrategy.DEFAULT_WINDOW_SIZE;
if (sessionWindow > 0)
{
updateRecvWindow(sessionWindow);
windowFrame = new WindowUpdateFrame(0, sessionWindow);
}
if (windowFrame == null)
frames(null, Callback.NOOP, settingsFrame, Frame.EMPTY_ARRAY);