File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
browsermob-core-littleproxy/src/main/java/net/lightbody/bmp Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -588,20 +588,21 @@ public Har endHar() {
588
588
589
589
@ Override
590
590
public void setReadBandwidthLimit (long bytesPerSecond ) {
591
+ this .readBandwidthLimitBps = bytesPerSecond ;
592
+
591
593
if (isStarted ()) {
592
- throw new IllegalStateException ( "LittleProxy implementation does not allow changes to read bandwidth limit after proxy has been started" );
594
+ proxyServer . setThrottle ( this . readBandwidthLimitBps , this . writeBandwidthLimitBps );
593
595
}
594
596
595
- this .readBandwidthLimitBps = bytesPerSecond ;
596
597
}
597
598
598
599
@ Override
599
600
public void setWriteBandwidthLimit (long bytesPerSecond ) {
601
+ this .writeBandwidthLimitBps = bytesPerSecond ;
602
+
600
603
if (isStarted ()) {
601
- throw new IllegalStateException ( "LittleProxy implementation does not allow changes to write bandwidth limit after proxy has been started" );
604
+ proxyServer . setThrottle ( this . readBandwidthLimitBps , this . writeBandwidthLimitBps );
602
605
}
603
-
604
- this .writeBandwidthLimitBps = bytesPerSecond ;
605
606
}
606
607
607
608
@ Override
You can’t perform that action at this time.
0 commit comments