Issue #4142 - changes from review

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2019-10-15 11:23:53 +11:00
parent a96fb176f6
commit 5ff79b0bf1
5 changed files with 13 additions and 18 deletions

View File

@ -39,6 +39,11 @@ public class WindowRateControl implements RateControl
private final int maxEvents;
private final long window;
public static WindowRateControl ofSecond(int maxEvents)
{
return new WindowRateControl(maxEvents, Duration.ofSeconds(1));
}
public WindowRateControl(int maxEvents, Duration window)
{
this.maxEvents = maxEvents;

View File

@ -11,14 +11,9 @@
<Set name="initialSessionRecvWindow"><Property name="jetty.http2.initialSessionRecvWindow" default="1048576"/></Set>
<Set name="maxSettingsKeys"><Property name="jetty.http2.maxSettingsKeys" default="64"/></Set>
<Set name="rateControl">
<New class="org.eclipse.jetty.http2.parser.WindowRateControl">
<Arg type="int"><Property name="jetty.http2.rateControl" default="20"/></Arg>
<Arg>
<Call class="java.time.Duration" name="ofSeconds" id="duration">
<Arg type="long">1</Arg>
</Call>
</Arg>
</New>
<Call class="org.eclipse.jetty.http2.parser.WindowRateControl" name="ofSecond">
<Arg type="int"><Property name="jetty.http2.rateControlWindow" default="20"/></Arg>
</Call>
</Set>
</New>
</Arg>

View File

@ -10,14 +10,9 @@
<Set name="initialStreamRecvWindow"><Property name="jetty.http2c.initialStreamRecvWindow" default="65535"/></Set>
<Set name="maxSettingsKeys"><Property name="jetty.http2.maxSettingsKeys" default="64"/></Set>
<Set name="rateControl">
<New class="org.eclipse.jetty.http2.parser.WindowRateControl">
<Arg type="int"><Property name="jetty.http2.rateControl" default="20"/></Arg>
<Arg>
<Call class="java.time.Duration" name="ofSeconds" id="duration">
<Arg type="long">1</Arg>
</Call>
</Arg>
</New>
<Call class="org.eclipse.jetty.http2.parser.WindowRateControl" name="ofSecond">
<Arg type="int"><Property name="jetty.http2.rateControlWindow" default="20"/></Arg>
</Call>
</Set>
</New>
</Arg>

View File

@ -34,4 +34,4 @@ etc/jetty-http2.xml
# jetty.http2.maxSettingsKeys=64
## Max number of bad frames and pings per second
# jetty.http2.rateControl=20
# jetty.http2.rateControlWindow=20

View File

@ -29,4 +29,4 @@ etc/jetty-http2c.xml
# jetty.http2.maxSettingsKeys=64
## Max number of bad frames and pings per second
# jetty.http2.rateControl=20
# jetty.http2.rateControlWindow=20