i2psnark: Fix config page showing router limit instead of configured 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.
This commit is contained in:
zzz
2024-06-29 10:26:32 -04:00
parent bd1f4c9f6a
commit 38e6fc5ef2

View File

@@ -990,8 +990,10 @@ public class SnarkManager implements CompleteListener, ClientApp, DisconnectList
int up = limits[1]; int up = limits[1];
if (up > 0) { if (up > 0) {
int maxup = getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW); int maxup = getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW);
_util.setMaxUpBW(up); if (maxup > up)
_bwManager.setUpBWLimit(Math.min(up, maxup) * 1000L); maxup = up;
_util.setMaxUpBW(maxup);
_bwManager.setUpBWLimit(maxup * 1000L);
} }
int down = limits[0]; int down = limits[0];
if (down > 0) { if (down > 0) {