mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-22 19:43:11 +00:00
lets see if this fixes bug 66 (http://dev.i2p.net/bugzilla/show_bug.cgi?id=66)
This commit is contained in:
1 parent
0a479be370
commit
deff14dfd8
1 file changed
+4
-2
@@ -146,7 +146,8 @@ public class TrivialBandwidthLimiter extends BandwidthLimiter {
|
||||
* Note that numBytes have been read from the peer
|
||||
*/
|
||||
public void consumeInbound(RouterIdentity peer, int numBytes) {
|
||||
_totalInboundBytes += numBytes;
|
||||
if (numBytes > 0)
|
||||
_totalInboundBytes += numBytes;
|
||||
if (_inboundKBytesPerSecond > 0)
|
||||
_inboundAvailable -= numBytes;
|
||||
}
|
||||
@@ -155,7 +156,8 @@ public class TrivialBandwidthLimiter extends BandwidthLimiter {
|
||||
* Note that numBytes have been sent to the peer
|
||||
*/
|
||||
public void consumeOutbound(RouterIdentity peer, int numBytes) {
|
||||
_totalOutboundBytes += numBytes;
|
||||
if (numBytes > 0)
|
||||
_totalOutboundBytes += numBytes;
|
||||
if (_outboundKBytesPerSecond > 0)
|
||||
_outboundAvailable -= numBytes;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user