mirror of
https://github.com/i2p/i2p.i2p.git
synced 2024-12-06 19:27:00 +01:00
divide by zero check
This commit is contained in:
@@ -789,6 +789,8 @@ public class TunnelDispatcher implements Service {
|
||||
int used = Math.min(usedIn, usedOut);
|
||||
****/
|
||||
int used = _context.bandwidthLimiter().getCurrentParticipatingBandwidth();
|
||||
if (used <= 0)
|
||||
return false;
|
||||
|
||||
int maxKBps = Math.min(_context.bandwidthLimiter().getInboundKBytesPerSecond(),
|
||||
_context.bandwidthLimiter().getOutboundKBytesPerSecond());
|
||||
|
||||
Reference in New Issue
Block a user