i2p.i2p icon indicating copy to clipboard operation
i2p.i2p copied to clipboard

i2psnark.upbw.max not applied after restart.

Open Tunoac opened this issue 1 year ago • 0 comments

db52cc7 i2psnark: Bandwidth limiter improvements introduced a bug: i2psnark.upbw.max is not applied during restart. Though the desired value is present in i2psnark.config file. i2psnark.downbw.max is not affected.

I think the bug is here:

SnarkManager.java, getBWLimit()

            int maxup = getInt(PROP_UPBW_MAX, DEFAULT_MAX_UP_BW);
            _util.setMaxUpBW(up);
            _bwManager.setUpBWLimit(Math.min(up, maxup) * 1000L);

--> setMaxUpBW is called before the Math.min ?

Thanks.

Tunoac avatar May 07 '24 18:05 Tunoac