Skip to content

Commit

Permalink
i2psnark: Fix config page showing router limit instead of configured …
Browse files Browse the repository at this point in the history
…i2psnark limit for max up bw after restart (Github #75)

This was just a display issue; actual internal limit was correct.
Snark limit will continue to be capped at about 60% of the router limit
to account for overhead.
  • Loading branch information
zzzi2p committed Jun 29, 2024
1 parent bd1f4c9 commit 38e6fc5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/i2psnark/java/src/org/klomp/snark/SnarkManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -990,8 +990,10 @@ private boolean getBWLimit() {
int up = limits[1];
if (up > 0) {
int maxup = getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW);
_util.setMaxUpBW(up);
_bwManager.setUpBWLimit(Math.min(up, maxup) * 1000L);
if (maxup > up)
maxup = up;
_util.setMaxUpBW(maxup);
_bwManager.setUpBWLimit(maxup * 1000L);
}
int down = limits[0];
if (down > 0) {
Expand Down

0 comments on commit 38e6fc5

Please sign in to comment.